Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Six Technologies to Help You Succeed in Mobile Development

DZone's Guide to

Six Technologies to Help You Succeed in Mobile Development

These six technologies and practices will help you write better code and thus, better apps for your chosen mobile platform. Read about SQL, RegEx, and more.

· Mobile Zone
Free Resource

When you begin to dive into the world of mobile development, you'll encounter a wide variety of technologies that are related to your platform of choice. For Android, you'll encounter Java and XML. For iOS, you'll find Objective C and Swift. Windows will introduce C# and XAML. Regardless of your platform of choice, here are six technologies to understand to further your development potential.

1. JSON

JavaScript Object Notation is less about JavaScript and more about the fact that it has become an incredibly widely used format for storing and transmitting structured data. Almost every programming language today offers robust JSON support, able to translate easily from the text-based format into native objects.

JSON is a very flexible format, but it's not ideal for every use case. It's generally a good rule to consider any string manipulation to be an "expensive" task regardless of the language you're working with. Whenever you translate to and from JSON, you take a temporary hit to performance. It's best practice to handle the JSON parsing to completely native objects on an ansynchronous thread, and to avoid using it for storing complex structures.

2. SQL

SQL was created in 1974, more than 40 years ago. The fact that it has remained a staple of every developer's knowledge base is a testament to how flexible and powerful of a tool it is. Where JSON is a great way to transmit information, SQL is how you organize and use it efficiently within your application.

Although some applications have a "flat" data structure, most mobile applications have a relational structure. This means that different pieces of information are tied together in some specific way. For example, a company has several users, many of whom have documents that may be private or may be shared with other users. 

3. RegEx

If you thought SQL was an old concept, RegEx makes it look young. The concept dates back more than 60 years to 1956. Short for "Regular Expressions," RegEx is a special notation to match patterns of characters. You can usually get away without using RegEx, but with applications ranging from input validation to natural language processing, a single smartly-designed regular expression can substitute for hundreds of lines of simpler string operations. The current standard was settled on in 1992, and is implemented in almost every programming language.

The unfortunate part of RegEx is that it's finicky and difficult to read. It's a skill that takes a lot of time investment to learn. Hardly anyone will immediately know that ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$ is a basic representation of an email address. Still, RegEx allows you to quickly and easily interpret patterns from strings. It lives under the hood of template engines, input validation engines, spelling and grammar checks, language processing, and more. RegEx is probably one of the more difficult technologies on this list to learn, but also one of the most versatile and powerful.

4. Unit Testing

When code becomes more complex, it can also become more fragile. Each time you change and refactor it, there is an increasing chance that something will become broken. Unit tests are a way to exercise your code, make sure it performs the intended operation, and quickly validate that things aren't broken when you make changes.

Each platform provides its own unit testing framework that allows you to write simple code statements that then check the outcome against a reference. The higher your unit test coverage, the more confidence you can have that changes you make will not impact or break the rest of your application. Many companies today require developers to unit test the majority of code that they write.

Some companies are embracing a concept called test driven development, in which the tests are actually written first, and code is then written to make the tests pass. This author personally prefers a happy medium, stubbing out the basics of the code, writing tests, and then implementing the handling of edge cases and exceptions. Regardless of your preference, though, learning how to write proper unit tests can give you more confidence and help you find defects in your code before they become a problem.

5. Source Control

Source control isn't code, and it isn't a language. Source control is how you track your changes and save your work. If you aren't familiar with it, think of it like change-tracking in a document. Every time you commit a change, that is tracked. You can then push those changes to an origin source, and others who have access can then check out your code to look at it and update it. More than just tracking changes, source control systems let you collaborate more effectively and work on unique features without breaking each other's code.

Source control can also be used for more than just your code. Images, planning documents, almost anything can be tracked. For text files, such as your source code, tracking goes even deeper, letting you know down to the letter who modified the file last. Source control lets you try new code approaches with the confidence that you can always roll back, and collaborate with others more effectively. Common systems are Git and Subversion. If you're looking to share and back up your code online, companies like GitHub and BitBucket have free services to do so.

6. Continuous Integration

Once you've got source control in place, you can make use of continuous integration. This is a term that refers to taking changes in real-time as they are committed and running some amount of automatic profiling. Eventually, a well-configured CI system can automatically run unit and integration tests, report results, check test coverage, update tasks and tickets, and even perform automatic deployments.

Even something as simple as running unit tests and compiling a project is valuable. It makes sure that you have something usable if someone new joins the team. For mobile applications, consider having your build server build and sign your application for deployment. If your application has multiple build flavors, a CI system can build one or all of them automatically at any specified version on-demand. Many CI systems are open source, flexible, and easy to run. Jenkins and Go CD are some of the easiest to set up and deploy.

Happy Learning!

While these six technologies aren't necessarily required, each can help take your development to a new level. They add efficiency and reliability, and overall value to your work. Do you have questions or want additional information or tutorials on these technologies geared towards mobile development? Let us know in the comments!

Topics:
android ,ios ,mobile ,mobile app development

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}