DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Latest Articles - DZone

article thumbnail
AI Not Living Up to the Hype? It’s a Communications Problem
The limiting factor is an inability to tell AI what to do without having to use technical details and code.
August 15, 2022
by Christian Frederiksen
· 6,366 Views · 1 Like
article thumbnail
Workout Tracking With Your App in the Background
An article about how to keep track of workout data in the background for a fitness app.
August 14, 2022
by Jackson Jiang
· 4,699 Views · 2 Likes
article thumbnail
MySQL's UTF-8 Isn't Real
In this blog, we will figure out why you should avoid using UTF-8 in MySQL and what to choose instead.
August 14, 2022
by Lukas Vileikis
· 7,083 Views · 3 Likes
article thumbnail
Brewing Patterns in Java: An Informal Primer
Thoughts on pattern matching, records, and sealing.
August 14, 2022
by Manoj N Palat
· 6,545 Views · 7 Likes
article thumbnail
Mocking the java.time API for Better Testability
Date/time logic has many edge cases. Here, we'll look at strategies to bend the clock to your will for better testability.
August 14, 2022
by Jasper Sprengers
· 30,227 Views · 5 Likes
article thumbnail
Neural-Symbolic Regression: Distilling Science from Data
Learn about neural-symbolic regression, how data scientists can make use of these algorithms, and what the future holds for them within deep learning.
August 14, 2022
by Kevin Vu
· 6,351 Views · 1 Like
article thumbnail
What Should I Choose in 2015 - Cloud Hosting VS VPS Hosting?
This article was originally published on 1/5/14 The countdown for 2015 has already begun and so are the businesses eager to roll out new strategies and technical innovations with the New Year. Especially the entrepreneurs. 2014 has been a year of many ups and downs for most ventures due to the various algorithm updates rolled out by the search giant. Yet, overall 2014 has been a successful year for many companies that focused on adaptation to the technological shifts. 2015 too would be a year when many ventures would be a part of this transition – either to sustain or compete in the competitive market. Learning and recruiting people with new skills and implementing new tactics would be vital look-out next year. Considering the evolution in technology, virtualization, or rather cloud-based virtualization and remote management can be a key consideration for businesses that haven’t upgraded their IT to it yet. With the ever-increasing number of online stores and eCommerce sites, a strong emphasis would be given to scalable services – preferably automatic scaling. 2014 indeed saw growth in the adoption of cloud technology and mobile platform for business websites, moreover it’s also proved beneficial not just to buyers but also to retailers using eCommerce to run their operations. Talking about hosting, the term ‘cloud computing or cloud hosting’ was heard from almost every corner of the Industry. Due to the consistent advancements in the area of virtualization and remote operations, conventional organizations and new firms are increasingly opting for similar hosting solutions today. Let’s take a sneak peek at the two types of virtualization solutions that we have access to today. Cloud Hosting: Does it Make Sense? From a cost perspective, there is no doubt that cloud hosting is beginning to make a lot more sense for many website developers. They understand that they need to do something about getting their websites up, and the best way to make it happen is to use cloud hosting. It is so cost-effective because there are now plenty of services that offer cloud hosting to those who need it. You don’t really need to shop around for this service in the ways that you used to, and the costs have come down considerably as the infrastructure has improved. Thus, you may want to look into this as a possible way to spend some of your time and resources. Virtual Private Server (VPS) Hosting – VPS in simple terms is where a single physical server is divided into smaller virtual servers using virtualization technology. For that purpose, VMWare and HyperV (hardware hypervisors) are the two technologies that actually made a mark in 2014. Having a physical dedicated server virtualized using one of the hypervisors, allows the creation of multiple servers that inherit the properties of the base server - each acting as a dedicated server in itself (in a virtual environment). One of the major benefits of VPS hosting is, that dedicated resources can be assigned to the virtual machines. Much similar to that of a physical server. Pros – It offers flexibility along with complete control/root access to the server. VPS is typically less expensive as compared to cloud hosting. The user can modify the settings on the server to adjust it according to the requirements. Through a shared environment, VPS clients can take leverage of dedicated environments with specific resource allocations. With VPS hosting, dedicated IPs can be allocated to each account. Unless it is a hardware failure, any virtual server is affected and exposed to downtime, the other servers aren’t affected. As users get root access to the particular server, one can choose the operating system and install any required software which makes it quite easy to manage the VPS. Cons – If there is any problem with the VPS server and needs maintenance or rebooting or has a hard drive error then all accounts hosted on it would face downtime. Despite the inheritance of characteristics of a dedicated server, computing resources of the physical server are still distributed across VPS accounts. Hence, ill operations run by a neighboring account can pose an impact on your server. Though one can choose an operating system (OS) only one OS can run on each physical server. Storage space on each server is limited and so when your VPS reaches the maximum capacity, arrangements for additional space or migration to new hardware remain the only option. Which again means downtime. Cloud Server Hosting – Slightly an enhanced version of virtualization, a cloud server makes use of multiple servers which are connected together in a single network – known as a cluster which is backed by RAID configurations. Users would still have root access to the Virtual machine, but in this case, the resources are pulled from a massive pool and released back when unused. Pros – Cloud hosting offers greater flexibility as it is extended to multiple physical machines pooling in their resources into one. The storage space as well as the other resources can be scaled up/down as per requirements. If any physical server runs down or fails, the virtual machines or VMs have transported automatically to other servers within the same cluster. Hence avoiding the downtime resulting in the cloud hosting being more reliable. Since a VM uses resources from a massive pool, the question of running out of it is negligible. This helps ensure optimum performance – even during peak hours. Each client on the cloud has the privilege to choose the operating system individually. Though a load of other cloud customers increases, the computing resources – RAM, CPU performance, and bandwidth being pooled in by multiple physical servers, result in a near unlimited supply of resources. The cloud server is easier to suffice custom requirements. It means clients can choose the OS, firewall, control panels, and other applications. Cons – There’s only one disadvantage of cloud in comparison to a VPS, ie, it's a little more expensive. As a matter of fact, both the solutions have been popular in the year 2014 despite their individual benefits and demerits. Where VPSs were opted for by websites for whom scalability and up-time weren’t much of a concern, while on the other hand, the sites that did require them opted for cloud solutions. A few service providers even offered a pay-per-use billing model in Cloud, where users would only pay for the resources that their sites/applications have actually used. With further work being put into the development of the Cloud, and an increasing volume of applications depending more on the cloud, 2015 is expected to be more of a cloud-friendly year.
Updated August 13, 2022
by Kelvin Smith
· 5,989 Views · 1 Like
article thumbnail
What you must know about PHP errors to avoid scratching your forehead when something goes wrong
While pure object-oriented languages produce mainly exceptions to signal an error, PHP started out as procedural and so it has a wide range of errors that can be raised along with exceptions. Errors are Human, But We Must Identify Them There isn’t a programmer alive who hasn’t made errors when coding something at some point in their career. It is simply a part of the process, and it is important to recognize that we will all make these types of mistakes from time to time. That said, it is best to identify the errors as they occur so as to correct them at the moment. The faster that one can react to the errors that they are making, the better they will be able to correct those same errors and actually make a difference in the programming that they are doing. Put another way, it may be necessary to move rapidly to correct errors so that the project itself doesn’t get knocked off kilter at all. It is all up to you as to how you will move forward when you spot errors, but the best thing to do is remind yourself that this is expected and that you can do things to correct it. What is the difference between the two? Exceptions are objects which can be managed and caught with try/catch blocks. You can create your own exception classes, with custom arguments and methods. They really object with special additional functionalities and you should definitely manage your error with them in PHP 5 and higher. Errors are accompanied by a message like exceptions, but they are managed by calling an error handler function (which may be custom) from the point when they occur. PHP and its native functions generate mostly errors and not exceptions. PDO and the SPL are the exceptions (what a pun) since they have an object-oriented Api which also comprehends exception classes. Exceptions always bubble up until they are caught; errors are instead passed to the current error handler, whose job is to decide what to do with them. With non-severe errors, printing them in bold and going on with execution is the default behavior. Understanding exceptions and their usage is a key topic in transitioning to object-oriented PHP, but is out of the scope of this article. Here we will treat errors since you'll always have to deal with PHP native functions even if your code is so good it only throws exceptions to your custom hierarchy: when you omit a {, an error is generated, not an exception. When a file passed to include() is missing, again an error is generated, not an exception. Most of the time unhandled errors are the result of a programming error: if you get an error to be generated, probably something is already gone really wrong and you shouldn't ignore them. Translation into exceptions However, dealing with errors in an object-oriented way is very difficult: you can't catch them. Thus PHPUnit translates errors into exceptions by defining a custom error handler that throws PHPUnit_Frameworks_Error_Notice or PHPUnit_Framework_Error_Warning in case of manageable errors. PHPUnit will also signal you with an E in the test base in case of an error, while the F is reserved for particular exceptions that designate assertion failures. Nothing stops you from doing the same: by defining your error handler, you can translate the errors of missing files in include() into an exception you can catch. The question is: shall you? Often a missing file, when containing for example the source code of a class, will only result in a more serious error like a Fatl one when the script is allowed to continue. Main error types These are the main types of errors, which were present in the language before PHP 4. The majority of the time during development, you'll only see one of these four error types. E_NOTICE: a noncritical error, like accessing an initialized variable. PHP is very forgiving and will allow the script to continue in production environments. E_WARNING: a more serious error, like passing a non-Traversable to foreach(), or including a missing file. E_PARSE: a syntax error, like a missing } or using a reserved keyword for naming a class. The script won't run at all as these errors are raised at compile (to p codes) time. E_ERROR: also known as Fatal Errors, they are unrecoverable even by the error handler. Calling a method on null, or calling an undefined function, or creating an object of a non-existing class would result in a Fatal Error, which will terminate the script abruptly (even if it is a test suite!) There are many other types of errors, but they are rarer to encounter. The full list is in the PHP manual. From the list, some interesting special errors should be mentioned: E_STRICT: infringement of strict standards, which from PHP 5.3 it is in the default. If you call a non-static method statically (by Class::method()), you will get this error. Enabling strict standards can help you improve your code quality. E_RECOVERABLE_ERROR: a catchable version of Fatal Error, such as trying to convert an object without __toString() into a string. It can be managed by error handlers, while Fatal Errors and of course Parse Errors can't (they leave the interpreter in an unstable state and cause an immediate exit()). php.ini directives There are two directives that are very interesting for managing errors. The first is error_reporting, which prescribes reporting some types of errors while masking others. Typically this value varies between production environments (don't show anything to the end user as it won't understand anyway) and development environments (show me everything as I want to eliminate all errors before shipping.) In fact, in development, I always set error_reporting to E_ALL. Anything else is so '90s. display_errors has also to be set to On for the errors to be printed. When you get a blank page instead of the expected result, check this directive. PHP functions error_reporting() allows you to set which errors to report and override the error_reporting in php.ini, again by using E_ALL and other constants. Note that some errors, like E_PARSE, are detected at compile time and so won't be influenced by this function. set_error_handler() allows you to define your own function to manage errors, which can then delegate to PHP default handler or completely override it. Take-home points Errors are a tricky part of PHP, but knowing how to read them will speed up your development. In your code, always define exceptions, which are much more versatile, but be prepared to manage errors thrown by PHP itself. Most of the time, they're just programming errors like a typo in a variable name or a missing semicolon. However, you should know how to define custom error handlers in case you're forced to deal with runtime errors like a problem with a socket or a database connection.
Updated August 13, 2022
by Giorgio Sironi
· 20,225 Views · 1 Like
article thumbnail
Why "Polyglot Programming" or "Do It Yourself Programming Languages" or "Language Oriented Programming" sucks?
Last year we saw the launch of a new Web programming language Dart - Structured Web Programming from Google. A very interesting approach to support web application development. Not so long after Go, Groovy, Ruby, Scala, << Name your DSL here >>; we see Dart. Is it a good thing to have at least one programming language to solve one problem? The answer is, like we already know, it depends. Stay Away From “Do it Yourself” It is your choice as to if you will try to do things yourself or allow the truly seasoned professionals to help out. Some decide that they are going to try to go it alone when they are programming something new, but this often ends up in a less than desirable place. It may even be more expensive than just hiring an expert who can help you get it programmed for you in the first place. Most people do not go it alone with the vast majority of important services in their life, so why should they ever attempt to do so when they are looking at how to create a website? It is best to avoid making this mistake, and just try to make some progress towards your goals by hiring people who truly know how to help you make the progress that you need to make. Some important backgrounds you should know about the multi-programming language paradigm are the following: 1. You can read Martin Fowler's article about language-oriented programming with language workbenches which enables you to write small programming languages easily. In this article I see everyone writing their small language, everywhere. In this concept, we see DSL (Domain Specific Language) as the future of our programming activities. Source: http://martinfowler.com/articles/languageWorkbench.html 2. Neal Ford talked about Polyglot Programming, combining multiple programming languages in application development. Later Mr. Fowler added this paradigm with Polyglot Persistence, using different types of databases within one application. Source: http://memeagora.blogspot.com/2006/12/polyglot-programming.html and http://martinfowler.com/bliki/PolyglotPersistence.html Since 2006 I already discussed and collected some experiences in multi programming language paradigm: 1. I remember a “hot” discussion in 2006 with Sebastian Meyen, chief editor of JavaMagazin Germany, also the biggest organizor of Java Conference JAX. We agreed to see the future of programming in a multi-language paradigm concept. I also said that all those languages will be based on Java VM. I also told him that one day SAP will move ABAP as a language that can be run within the Java VM, so just another language within the Java environment, with no two different personalities anymore. Today we see the beginning of this in the project called Caffeine ABAP. Source: https://cw.sdn.sap.com/cw/groups/caffeine 2. Also in 2006 I had a project in which we also used different kinds of languages and also created our own DSL: Java for the most implementation stuff UML for the design of the business objects. We generate a lot of things using the concept of MDA (Model Driven Architecture) Groovy for a lot of things, especially for writing unit tests Based on ANTLR we create our own DSL for some aspects of the application It was really exciting and we had some very good programmers in the project. The result was a very nice and flexible product, just as what we expected at the beginning of the project. Please read this article in the German language for more information: http://www.sigs.de/publications/os/2009/02/dewanto_egger_OS_02_09.pdf So after all those nice things about the multi-language paradigm, I told you, why does this suck at the end? Here are some reasons from my point of view: 1. As typical in application development the problem comes first in the maintenance phase after all the capable programmers leave the project. Did you, programming language creators ever try to teach a new programming language to a “normal”, 9 till 5 programmers? I’m not talking about 9 (am) till 9 (pm) programmers who love to learn new languages. It is definitely tough to be proficient in one programming language. This is comparable with the languages we speak every day. I’m not a native English speaker, so I’m quite sure that I made a lot of syntax and grammar errors in this article. It is possible to be able to speak three or four languages perfectly but this is an exception. 2. Did you ever try to maintain a big Struts web application with AJAX? Just try to add functionality and you will end up creating and editing a lot of files: Action and Form files, Struts XML configuration files, JavaScript files with JSON, and also HTML or JSP files. Can you imagine adding Groovy, Scala, and Dart additionally into that web app? The complexity of such a project is very high. 3. Creating a new programming language means that you also have to build the environment for it. Good IDE, good documentation, good community support, a clear roadmap, and backward compatibility are some points to be done. Groovy is a bad example of this. In the early version of this language, the editor for Eclipse was really bad. After a while, they improved the editor but they made a lot of basic changes in the language so your old groovy applications do not work anymore. You are punished if you update to the new version. This never happens to Java. You still can compile Java 1.1 applications with Java 6 compiler. 4. Before you are creating your own DSL with e.g. ANTLR ask those language Gurus first, how hard it is to maintain a programming language for the long term. Before you discuss with them don’t ever create your own DSL. Especially if you are working for SME (Small and Medium-sized Enterprise). With a small team and small budget, you will never ever maintain your own language decently. So in year 2012, six years after my support to Polyglot Programming, I hope to see following things happen: 1. One language for all aspects in one application is the best concept ever. I name this as “One for All Programming Language paradigm”. Just like we don’t use English as a technical language, German as a literate language, and Indonesian as a community language, to be able to communicate internationally with each other we just use English pragmatically for all aspects of our life. In Germany, you need to speak German in all aspects to be able to communicate with others. My best solution so far is Java + XML, that’s it, no more, no less. No mixing with Groovy, Dart, Ruby, Scala, <> in one application. Especially if you are working as a contractor, please don’t try to use all those languages just for a small Java web application. I don’t say that you should not use the other languages at all. The only thing which is important is not to mix those languages in one application. In SME you may also want to use just one programming language for all your applications. 2. Concept like GWT (Java to JavaScript compiler) or XMLC (XML compiler which compiles XML, HTML to Java classes) is great. You can work just in plain Java. Guice with all Java and no XML is also a great solution (I know that SpringFramework is also doing this with Annotations). Android is great because it uses Java as its application programming language. In conclusion, I can only hope to see more such pure and plain Java solutions in 2012!
August 13, 2022
by Lofi Dewanto
· 14,531 Views · 5 Likes
article thumbnail
The Web Performance APIs Reference
Performance is a big focus of the W3C Web Performance Working Group. Check out these APIs which provide a reference for web performance and W3C standards.
August 13, 2022
by Barbara Bermes
· 16,544 Views · 2 Likes
article thumbnail
Using the TabControl on Windows Phone 7
By default, the Windows Phone 7 SDK doesn't have a TabControl. It is a quite useful component already available in Silverlight and although it doesn't quite follow the Metro style, it can have its use. For example, some Android applications have a similar UI: Adding Relevant Features It is so very important to remember that relevant features sometimes need to be added to a phone to make it as fully operational as we would all like for it to be. Sadly, there are some people who don’t realize that they need to put this kind of time and effort in, and they may end up using a phone that doesn’t have all of the functionality that they deserve it. Those who find themselves in this boat need to know what they can do to add back some of the functionality that they have lost to it. It is best to try to put in features such as the TabControl and other codes into one’s phone when possible to make it work in all of the best ways possible. Those who do so are giving themselves a leg up that they might not otherwise have had if they didn’t take the time to add in these relevant and cool features right from the start. In order to use this control, a complete rewrite is not necessary. All that needs to be done is add a reference to System.Windows.Controls - a standard Silverlight library that is located at: C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client If the development environment is set up on a 32-bit system, the x86 part in the location should be excluded. The next step is adding the assembly reference as a namespace pointer in the work XAML: xmlns:cc="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" To add the control to the workspace: What I get at this point is not exactly the type of UI style I want to see on my Windows Phone: I worked a little bit with Blend and got it to look just like any other Metro-compatible control. The style is shown at the bottom of this article - it can be included in the Resources section of the app or page and then bound to as a StaticResource. After the redesign, I got this appearance: Much better! What I really like about the Silverlight TabControl is the fact that I can position the tab headers wherever I want by simply changing the TabStripPlacement property - it can be Top (default), Bottom, Left and Right. Here is how it looks like with custom placement: The contents of each TabItem should be placed inside a Canvas: With the help of a short DataTemplate I can set the HeaderTemplate to show an icon along with the text: Sample Here is the basic Metro style that should be applied to the TabControl to be more WP7-like:
August 13, 2022
by Denzel D.
· 25,227 Views · 1 Like
article thumbnail
Using the LongListSelector control on Windows Phone 7
Yesterday I looked into the Silverlight Toolkit for Windows Phone and I covered some of the controls that are included in the current build. One of the controls that might be a bit unusual to configure and get working is LongListSelector, which allows you to group items inside a list. With a regular ListBox, you can display data but there is no way to jump directly to an item set, and there is no way to group items. Clumping Items Together One of the best features of any phone is the ability to clump together large lists of items so that they become easier to sort through. Not every phone has this ability though, and it can be very frustrating for some phone owners who are just trying to go through their lists in the easiest ways possible. The main thing to remember about Windows 7 phones is that you can program in the ability to sort through long lists much more easily. You don’t have to worry about sorting through those lists line by line anymore. You can get it all done via the programming that you put in place, and then you will be all set to move on to the next thing. If this sounds ideal to you, then at least consider getting the programming for your Windows 7 phone done right now. It is a favor that you owe to yourself. To start, add a reference to Microsoft.Phone.Controls.Toolkit library, which was bundled with the Silverlight Toolkit. If you are not sure where the library is located, check out my previous article to get the basic info about the distribution. Also, add a reference to the library by adding an additional XML namespace reference in the page tag: xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" Once done, you can create a control instance on the page itself, or in any other container that supports a control to be set as Content. But right now the list itself is nothing but a blank control. To fix this, first of all you need to define some templates that will show how exactly the data will be separated in the list, by using a list header, group headers, and group item headers (used to switch between groups), and an item template. In the page-based resource dictionary, add the following data templates: These are templates very similar to those used in the sample provided on the Silverlight Toolkit website. I decided to use them here since they represent the best example of UI consistency with the existing Windows Phone elements. But it's not the appearance that matters here. The first template is GroupHeader - this is used to separate content and is used to represent a set of items grouped by a common property. If you look at the binding, it is bound to the Key property, which is dependent on ItemsSource set to the main list. GroupItem is used to represent the same group header but in the context of a jump list that appears when the user touches an actual group header (that is how it is possible to jump to different item categories). It is bound to the same Key property as each of the group headers. ListHeader is displayed at the top of the list when it is loaded. It is not moved with the list as that is scrolled and it is also not associated with any group, therefore it won't be displayed above a group header other than the first one. I left this one un-bound, but you can certainly bind it to a super-category name (passed somewhere in a list or a separate property). ItemTmpl represents the appearance of each item that falls into a specific category. In my case, I am only using a TextBlock control, however, you can add a much richer set (e.g. include images and/or multiple controls). Currently, it is bound to the Title property, which is a part of a custom object I am passing, but I will get there later. Now I need to actually bind the list to a collection of items that are differentiated in categories. And here, an interesting process is involved. First of all, I am going to create a custom class that will represent an Item object: public class Item { public string Title { get; set; } public string Content { get; set; } } It is pretty simple - two string properties that can be set and retrieved. The Content property in my case will be the grouping key. But there is no actual list yet that can be bound. So, when my main page is initializing, I am also creating a list of items and populating it with sample content: List mainItem = new List(); for (int i = 0; i < 20; i++) { mainItem.Add(new Item() { Content = "Category A", Title = "Sample " + i.ToString() }); mainItem.Add(new Item() { Content = "Category B", Title = "Sample B" + i.ToString() }); mainItem.Add(new Item() { Content = "Category C", Title = "Sample C" + i.ToString() }); } But here is another problem - the items aren't grouped. Indeed, these are divided into elements that have different Content property values (and there are 20 items that have this property set to the same value), but as such - there are no groups. Right now is the case to use the IGrouping interface, and I am getting an instance of it for each object set via LINQ: var selected = from c in mainItem group c by c.Content into n select new GroupingLayer(n); But look what's here - instead of using IGrouping with the same generic parameters, I am using GroupingLayer. It is an implementation of the IGrouping interface that exposes the Key property, used to set group names. If I would pass an IGrouping instance, I wouldn't be able to bind to the Key property since it is internal. GroupingLayer is an abstraction layer on top of that: public class GroupingLayer : IGrouping { private readonly IGrouping grouping; public GroupingLayer(IGrouping unit) { grouping = unit; } public TKey Key { get { return grouping.Key; } } public IEnumerator GetEnumerator() { return grouping.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return grouping.GetEnumerator(); } } So once the LINQ query executes, you get an instance of IEnumerable>. The group header will automatically link to the string value and every item grouped will be linked to the Item instance stored in the object. You are now able to bind the list to the control: LongList.ItemsSource = selected;
August 13, 2022
by Denzel D.
· 37,974 Views · 1 Like
article thumbnail
Using AI To Improve Your Predictive Capabilities
Let's take a quick look at how you can use Artificial Intelligence to improve your predictive capabilities.
Updated August 13, 2022
by Adi Gaskell
· 6,155 Views · 1 Like
article thumbnail
Total Bummer: Pivotal Drops Groovy
Pivotal announced yesterday that Groovy 2.4 And Grails 3.0 will be the last major releases under Pivotal sponsorship. This is big news that has not surprisingly created a lot of buzz in the blogosphere. In this post, I describe some of the questions that others and I are wondering about and speculate on Groovy's future. Groovy’s Future is in Doubt Sadly, it appears at this time that is more likely than not that Groovy does not have a significant future ahead. It would seem that the developers of this program are going to allow it to rot away instead of taking any action steps to potentially stave off such an outcome. It seems from the statements put out by Pivotal that they are likely to nix Groovy due to a general lack of use among its customer base and the inability of the company to keep up with everything that it needs to in order to continue to offer this service to those who are still using it. We are sorry to say that it appears that Groovy is on its way out even though we don’t want it to be. Sometimes, that is just the way that these things go. After reading multiple Reddit references to this announcement, my initial thought was to see what Guillaume Laforge had to say about this. Apparently, a lot of people had the same idea because I encountered a 503 error when trying to access his page. Fortunately, I did not have to wait for Laforge's blog to be available to get more insight from him on this announcement because there were a couple of interviews with him regarding the announcement already online: Voxxed.com's Pivotal’s "Sad and Odd'' Decision to Set Groovy Adrift and InfoQ's Pivotal Pulls Groovy/Grails Funding. Since that time, Laforge's blog is available again and has a post on the subject calledThe Groovy project is looking for a new home. Another person frequently and deservedly associated with Groovy, Graeme Rocher, has also posted on the subject: The Future of Groovy and Grails Sponsorship. Laforge and Rocher were co-founders of G2One, which was acquired by SpringSource in late 2008. VMWare then acquired SpringSource about one year later (and VMWare had been owned by EMC since late 2003). EMC would later announce the spin-off of Pivotal in 2013 and Pivotal today announced the dropping of Groovy support as of 21 March 2015. Questions, Answers, and Speculations The posts referenced here in my post have collectively answered some of my questions about Groovy and at the same time presented additional questions. Why is Pivotal dropping the financial support of Groovy and Grails? Answer: Pivotal's announcement: "The decision to conclude its sponsorship of Groovy and Grails is part of Pivotal’s larger strategy to concentrate resources on accelerating both commercial and open source projects that support its growing traction in Platform-as-a-Service, Data, and Agile development. Pivotal has determined that the time is right to let further development of Groovy and Grails be led by other interested parties in the open source community who can best serve the goals of those projects." Who Might Sponsor Groovy and/or Grails Development? Speculation: Many organizations benefit from Groovy and Gravy, but many probably aren't prepared to invest as fully in their development as G2One, SpringSource, VMWare, and even Pivotal have been. An example of an organization with an obvious vested interest in Groovy's future is GradleWare. Ken Kousen has tweeted and written a blog post on the opportunity of acquiring Groovy and Grails sponsorship. What does this announcement mean for Groovy's future? Answer Mixed with Speculation: Based on Laforge's and Rocher's posts, it seems clear that the core developers plan to continue working on Groovy. However, it is understandable that if this effort is not funded (sponsored), it will have to be at a slower pace than before (I have found through personal experience that home projects take a lot longer to complete than paid projects). I believe that Groovy has strong momentum already that will continue for some time. It is vital to Gradle, is used with other open source projects and tools such as SoapUI, and could have a promising future running on Android. I primarily use Groovy for scripting and simple "glue" tools in Java applications. The language is mature and serves these purposes well and I see no reason to stop using it at this time. What does this mean for the future of the Spring Framework? Speculation: There is some concern that perhaps Spring Framework could be jettisoned next from Pivotal. This seems unlikely to me, but I didn't expect Pivotal to drop Groovy either. As much as I love Groovy and as much effect on Java and JVM development as I acknowledge it has had, I think Spring Framework has been even more pervasive in Java EE development than Groovy and Grails have been in Java SE and Java EE development. That stated, Pivotal has shown that they are willing to, as most successful businesses are, drop a product offering that is perceived as not benefiting their strategy and bottom line. I can certainly understand if this development concerns users of Spring. Is Standards-Based More Important than Being Open Source? Answer: This is a difficult question to answer that often depends on numerous contextual factors including the tools being compared, the expected length of life of the products being built, etc. Fortunately, we often don't have to choose between these as many reference implementations in the Java world are also open source. However, a point can be made that any product that is not standard (including commercial or proprietary) is subject to losing support or not being available any longer. The theory is that if standards-based products are used, one can then shift to another implementation of that standard if necessary. However, a standard is only as good as its implementations and if there is only one realistic implementation of a standard, there's not much of an advantage of transferability there. Conclusion Although I understand Pivotal's motivation for dropping Groovy, I am still sorry to hear that news. I appreciate the effort that key Groovy contributors such as Laforge and Rocher have made and I appreciate the companies that have sponsored that work. Through this sponsorship and work, we have a really nice language to use for scripting and other purposes. I hope that a sponsor can be found for Groovy, but I plan to continue to use it either way.
August 13, 2022
by Dustin Marx
· 13,176 Views · 1 Like
article thumbnail
The Rise of Full Stack Developers and the Benefits of Becoming One
It's the return of the full-stack dev. Do you have what it takes to become a master of all?
Updated August 13, 2022
by Sam Dias
· 10,590 Views · 3 Likes
article thumbnail
The 80% Rule of Program Coupling
How understanding the fundamentals of software structure is a great way to earn job security.
Updated August 13, 2022
by Edmund Kirwan
· 10,018 Views · 4 Likes
article thumbnail
The 5 Most Promising Frameworks of the First Half of 2016
An in-depth look at what distinguishes some newer JavaScript frameworks like Polymer, Aurelia, Meteor, Webix, and React.
Updated August 13, 2022
by Ivan Petrenko
· 42,958 Views · 37 Likes
article thumbnail
Some Thoughts on Agile Planning
Agile Math The basic math of team-based agile is pretty simple. You can slice it several ways, but at the end of the day, one of these three basic formulas has to hold true. It’s all about time, cost, and scope… you get to decide which two constraints you want to lock, but then you have to derive the third. 1. backlog size / velocity = duration 2. duration * velocity = backlog size 3. backlog size / duration = velocity I generally suggest that agile is all about fixing time and cost, and deriving scope… but it doesn’t have to be that way. Feel free to derive time-based on a fixed backlog and known velocity. You can even derive a planning velocity based on fixed scope and time. This one is the riskiest, so be prepared to measure, adjust, and negotiate as the plan unfolds. Limiting WIP But here's the rub… when a team has too much work to do, and not enough time to do it, there is a cognitive dissonance between the messages of agile and what they see on the ground. We can say all day long that the PO gets to decide the “what” and the team gets to decide “how” and “how much”… but if management is fixing all three variables, the team isn’t going to buy in. Putting the Right People in Place One of the biggest mistakes that people make when working on any coding project is not having the right people in the right spots to help them out. It is absolutely necessary to use the talent and resources that are available to you in the most effective ways possible. Doing anything short of that can lead to major issues that you do not want to deal with. Instead of taking a risk, make sure you look at the pool of talent you have beforehand and begin to reassign people based on the skills that they clearly possess. You may be able to connect just the right pieces where they need to go in order to place people in the correct spots where they can be the most effective possible for you. If this is the case, then you will be in good shape when the time comes to use those people to get certain missions completed. You are responsible for putting people in a position where they can be as helpful and useful to you as possible. Observe their strengths and weaknesses to try to figure out exactly where that spot is. This may take some time, so make sure you have budgeted enough time for yourself to get these kinds of things figured out. It won’t always be easy, but it is the kind of work that you need to do to see real results on your projects. Rushing the Backlog Generally, here is what I ask from management out of the gate… give us three sprints to help the team come up with a backlog and establish a velocity, afterwards we’ll see what we have and decide how to proceed further. We’ll start by doing just enough backlog planning to identify a sprint or two worth of work and get the team working to establish a velocity. While the team begins work to establish their velocity, the PO aggressively moves to create the backlog. Almost never do I see a PO that can create a backlog all by themselves. Very often we need Product Managers, Architects, and Analysts to paint the complete picture. More often than not, I’ll ask these folks to work full time for as long as it takes to get the backlog together. I’ve got one PO team that has been at it for 8 weeks just to get ahead of the team, and define the release. Initially, the PO team is focused on feeding the team's high-value, high-risk stories… but as the backlog emerges we start rounding out the app. If all goes well, after several sprints we have a decent idea of what we have to build and the rate at which the team can complete the work. At that point, we apply one of our three formulas, baseline the plan, and go. Emergence or Convergence How far ahead of the team you need to be, largely depends on your business goals for the release. If you are highly uncertain about what you need to build, smaller backlogs are probably better, and the release planning process can be more nimble. Trying to predict stuff you just don’t know is a waste. In this case, agile is helping support an emergent outcome. Not all companies are going for an emergent outcome… Some want stability and predictability. In these cases, the PO team needs to plan further ahead of the team and adjust as the product is developed. The better we know where we are going, and what it is going to take to get there, the further out we can plan the backlog, and the more certain we can be about outcomes. Here agile is supporting a convergent outcome with a focus on risk reduction and predictability. One of the biggest problems I see with teams new to agile is that they act as if they are going for stability and predictability, when their product requires an emergent approach. Either requirements are not well understood or because of high technical risk or a ton of unknowns around how to implement them. Either way, you have to act as if the project is emergent until you gain enough knowledge to establish a more predictable plan. Not Knowing What You Don’t Know I’ve met a few teams lately where everyone is new and unfamiliar with the product and the code base. How do you set a schedule in this environment? The short answer is… you don’t. It’s okay not to know, but it’s not okay not to know forever. In this case, you better have a plan to get it figured out fast… It’s not reasonable to indefinitely ask the business to invest with no strategy for getting it done.
August 13, 2022
by Mike Cottmeyer
· 7,724 Views · 2 Likes
article thumbnail
Safeguard Your Xamarin Apps From Threats With Dotfuscator
We take a look at how mobile application developers working with Xamarin can secure their apps with this free, and awesome, tool.
Updated August 13, 2022
by Kaushal Shah
· 7,132 Views · 3 Likes
article thumbnail
Responsive Design and jQuery Mobile
The source code The slides for the talk "Mobile First!" is the new cry of web designers worldwide. But how do you do it? Do you have to scrap all of your current web skills? Is it magic created by wizard-like designers which could never be understood by mere mortals? Believe it or not, with the combination of jQuery Mobile and CSS3 Media Queries, you can easily create a site that looks good on a phone, tablet, or desktop. Does Mobile-First Still Matter? Yes! You still need to look to design all features of your programs with a mobile-first mentality. People are spending increasing amounts of time on their phones, and they expect the companies that create products for them to come up with something that will enable them to continue to view those products from their phones. If you are unable to do this for them, they may simply move on to another company that can provide them with that kind of functionality. You have a lot of choices to make when it comes to the specific features that you will use and embrace, but you need to consider how going mobile first can help bolster the chances of your application being used by the masses. General Responsive Web Features The web began as responsive. Now admittedly, the web didn't do very much, so being responsive when the Internet was mainly documents was easy. HTML documents naturally wrapped to the next line and flowed down the page. Along the way, things changed. Developers began designing sites in tools like PhotoShop and wanted perfect pixel renderings of those designs. The problem with pixels is that they are not very flexible. It has always been possible to use percentages instead of pixels, but they were clumsier to work with, so pixels remained the favorite. With HTML5 and CSS3 there is more support for responsive design. Lets Meta Tags Meta tags have been the favorite of the SEO crowd for some time. Meta tags are used to define keywords, descriptions, and even redirects. Here are some rules about meta tags: They always go in the section of the page They are never displayed They consist mostly of key/value pairs: name = key and content = value Viewport The viewport is a special type of meta tag which defines the screen of a mobile device. In the example program the viewport meta tag looks like: The attributes above mean: width=device-width - converts the pixels to CSS pixels initial-scale=1 - sets the scale level user-scalable=no - turns off scaling If the initial scale is some other value than 1, the zoom can be smaller or larger. If user-scalable is set to yes, then the user sets the zoom level by tapping, pinching, or whatever zoom gesture the browser supports. Media Query Media Queries are the workhorse of responsive design. A media query is a media type and at least one expression that limits the style sheets' scope. Here is an example: @media screen and (max-width: 1024px) and (orientation:portrait) { } The above media query means: For a screen media type Define the classes only if The width is less than 1023 AND the orientation is portrait The media query begins with @media then a media type, in this case, screen. Other types are all, braille, embossed, handheld, print, project, speech, tty, and tv. You can compose complex media queries using logical operators like not, and, and only. not - is used to negate an entire media query and - used to combine multiple media features together into a single media query only - used to apply a style only if the entire query matches Finally, there is the comma-separated list which behaves like an operator. If any media queries return true, the style sheets get applied. One pattern for applying the media queries is to define the query for the narrowest device first, then define it for a tablet, and finally a desktop. Now all of these definitions are pretty loose and open to interpretation. You may need to adjust them to fit your needs. If you run the demo on a high pixel phone like a Nexus 4, which has a display of 1280x768 resolution, why doesn't it display like a desktop? The key is the viewport meta tag. This tag, which is read by mobile browsers, redefines the pixels as CSS pixels. The precise number of CSS pixels varies by device, but on the iPhone, it is 320 and on the Nexus 4 it is 384, both of which are less than the minimum of 480 pixels to be defined as a tablet. jQuery Mobile Features So far we haven't looked at jQuery Mobile features. From the get go jQuery Mobile has had responsive features. Some of which are: grid - a simple way to build CSS-based columns that can also be responsive tables - selectively hide or shows table columns based on the display width panels - create a hidden page that slides left or right to reveal itself Grids Grids have been with jQuery Mobile since the beginning. They are essentially self sizing columns that dynamically resize themselves when the size of the page changes. The number of available columns ranges from two to five. To change the number of available columns simply change the class on the root p then add or remove a p from the collection. ui-grid-a = 2 columns ui-grid-b = 3 columns ui-grid-c = 4 columns ui-grid-d = 5 columns Tables Tables were added with the release of jQuery Mobile 1.3.0. They allow for the responsive display of tabular data. There are two basic types of tables: reflow which is the default and column toggle. Reflow tables lay the table data horizontally until it reaches a minimum size, then all of the data for each row is grouped together and it re-flows down the page. In column toggle mode, each column of a table can be given a separate priority, when the data can no longer fit horizontally, the column with the lowest priority number which is still visible is hidden. This continues until a minimum size is reached or there is only one column remaining. Panels A panel is a hidden page that reveals itself by sliding from the left or right onto the page. It can support nearly any jQuery Mobile widget. When the panel is displayed, clicking anywhere else on the page will close it. Best Practices Design styles beginning with "mobile first", then go wider Use "min-width" to constrain styles Prefer percentages and ems to pixels
August 13, 2022
by Troy Miles
· 15,845 Views · 1 Like
  • Previous
  • ...
  • 665
  • 666
  • 667
  • 668
  • 669
  • 670
  • 671
  • 672
  • 673
  • 674
  • ...
  • Next
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook
×