Android, C#, xamarin

Xamarin Forms 2.2.0.5-pre2 Released

Hi all,

This is great news, Xamarin Forms NuGet package will get another big upgrade with 2.2.0 stable release.

I got notice about it because one of the bugs I reported about CarouselPage is in RESOLVED status. It seems that CarouselPage is going to be deprecated in favor of a new View called CarouselView.

I’m very excited about the amount of bug fixes and new features in 2.2.0 and I’m looking forward to test 2.2.0 stable release. Specifically, as an Android fan I’m looking forward to upgrade the Google Play Services packages to 29.x to have the latest packages and stay updated in the cross-platform world.

For more information on the bug fixes and new features in this pre-release version, check out the official release notes.

What do you think about this pre-release? Have you tried it yet? Let me hear your experiences in the comments section.

C#, xamarin

Xamarin Adventures: Consistent Cross-Platform Multi-Threading

Hi there readers! Like I said in the last post, I wanted to write something about Xamarin, and now that it’s open source you might be more interested than before in taking this framework for a spin.

Xamarin is a .NET framework used to build Android, iOS, Mac and Windows Phone apps. It uses C# language features to map Android and iOS APIs and also has a top level abstraction called Xamarin Forms to achieve the most common user story scenarios.

I will start these series of posts, with one question that I think is a keystone to all subsequent development issues you might find when dealing with multi-threading.

Continue reading

Android, C#, xamarin

Xamarin Adventures of an Android guy

I’ve been doing cross-platform mobile applications for quite a long while now. I’ve done some PhoneGap apps, and Android apps, and now is the time for Xamarin.

Xamarin is a technology that’s growing fast, and as a mobile developer, is an unescapable career experience. With Xamarin I’ve been able to make iPhone apps for some clients and I’ve learned the importance of being a versatile -language agnostic- programmer.

It’s important to know how to achieve the same goals regardless of the platform you are a fan of, and being able to be as productive as you were without your usual tools.

That being said, it’s been also fun and challenging to try to integrate Java and Android technologies to the C# world. I personally used MonoDevelop in the past for doing some Mono projects back in 2008 but I never thought I would be using it this often. It’s fun how the jokes around Free Software and Privative Software start to mix into a "Dude, I know Object Orientation!" statement.

Who knows, maybe in ten years or less I end up coding in OCaml again, like in my college days in Coruña, Spain.

I hope to make a couple of posts in the future, featuring some Android + Xamarin crossovers. Definitely in time for Superman vs Batman crossover this week! Yay!

Cheers!

pampanet

New Domain, more adventures

It’s been a long time since the last publication, I’m still trying to fit in the blogoshpere and wanted to start writing again, but I wanted to have some more personality within the interwebs.

I decided to get a domain for the blog, so now you can access this blog via http://pampanet.org

More technical adventures are coming, with top notch technologies that are really challenging for today’s developers.

See ya!

Android, edu, Java

Academic Android Certification

I finished Coursera’s Mobile Cloud Computing with Android Specialization. It’s been a really wonderful experience to get through all the courses and the final capstone.

The Specialization starts with a first approach to all the basic features in Android’s API and from there, the course gets you through all the advanced features -Location Services, Security mechanisms for Intents, Sensors…- with the use of some optimized algorithms curated by the professors to help us learn the best practices for the these vast platform.

It also covers concurrency and design patterns used in multiple areas, not just Android, like ThreadPools and Queues for managing multiple parallel threads and synchronization, the Half Sync-Half Async pattern -used also in BSD Unix-, or Dependency Injection pattern -widely used in web application development- using Spring Framework. With concurrency, there’s a part in one of the courses that covers Networking, using Netty framework -one of the best frameworks in my opinion- for starting a Java web server without using the standard Servlet specs.

Finally, it covers the BackEnd too, with exercises using Spring 4’s framework. This last one has topics like HTTPS, OAuth2, RESTful Web Services -using RetroFit library- and best practices for using WebViews, helping us understand the whole picture when building Cloud Services for Android Applications.

The Capstone project was truly challenging, covering design documentation for Mobile + Cloud projects and deployments using enterprise PaaS products like OpenShift. It kept the focus on today’s industries needs and trending topics for mobile and cloud applications.

Overall, a great Specialization to do, recommendable to everyone willing to start in the Mobile development world and earn a lot of knowledge, with flexible times, and in the timespan of a year.

Special thanks to the professors from Universities of Maryland and Vanderbilt for this great specialization.

Java, Netty, Networking, Node.js

My Guice Integration Adventures: Building a Server from scratch with Netty

Intro & Motivation

I came to this also by the Android MOOC offered by Coursera last year, and I found this framework really useful for building event-driven application servers.

In previous posts I talked about Node.js and it’s ease of use when developing web applications. Node.js is also event-driven and it counts with a lot of features and today it counts with very wide community. It has been a great experience to work with Node.js.

Netty Rulez Too

Netty Logo

Back in the Java world, Netty tries to achieve Rapid development of maintainable high performance protocol servers & clients, so I wanted to give it a try with my favorite DI framework. The server was drastically more lightweight and feature specific, but I didn’t have Servlet support. This is going to be a next step for sure if you want to fully migrate your webapp from your previous Java Application Server.

I made a very simple Java project with Guice and Netty, a Non-Blocking Event-Driven Server with Dependency Injection integrated.

Project and Code

The example application is in my github repo: guice-netty-bootstrap

Java, MBaaS, SaaS, Web Development

My Guice Integration Adventures: Building Servlet 3.x RESTful Web Applications

Intro & Motivation

Following the line with my previous post about Jersey + Guice integration, I wanted to get deeper on the Servlet 3.x specs and the new Asynchronous features in Java.

This was one of the limitations I found in my previous approach. The lack of asynchronous request processing within my Web Application.

RESTful Java with JAX-RS 2.0 Book

My Investigation led me to RESTEasy Framework. I found this framework to be very handy and very updated with Java specs on JAX-RS, JSR-330, and Asynchronous Servlets.

I also bought the book RESTful Java with JAX-RS 2.0 (2nd Edition), which offered a very complete insight about this library and it’s capabilities. It’s also written by Bill Burke, who according to O’Reilly Media “is a Fellow at the JBoss division of Red Hat Inc. A long time JBoss contributor and architect, his current project is RESTEasy, RESTful Web Services for Java”. Big Kudos to Bill Burke for this great book and RESTEasy framework!

Third Approach: Apache  Shiro + RESTEasy + Servlet 3 + Guice

This integration was tricky because I had to ditch the so comfortable guice-servlet package. But RESTEasy provides a fancy way to integrate with Guice through their GuiceResteasyBootstrapServletContextListener. Also to complete the whole Servlet/Filter 3 implementation, I used the Filter30Dispatcher.

This third approach also has Apache Shiro integrated, which I explain in detail in other post, to build a fully Secured Web Application.

JBoss RESTEasy Logo

The ContextListener is the way of RESTEasy to inject Guice’s Injector into the Web Application Context. it has a methods to enumerate all the Modules (Guice AbstractModule’s implementations) needed for the WebApp and a method to operate with configurations just after the Injector is created.

Noteworthy about JAX-RS API

There are several ways to bootstrap your beans/POJOS in your Web Application. The way JAX-RS proposes to expose its Resource Classes is by its Application class. This class defines the Singleton classes and Prototype classes that will have the RESTful annotations for exposing Resources. It is a good practice to have all the RESTful Endpoints in a dedicated package like “.rest” or “.endpoint”, just like with the Jersey framework and their “packages” parameter, so in my case, migrating a Jersey Resource to a RESTEasy one was a very light task if not a massive file copy&paste among projects.

Code Template

The github project shiro-guice-async-webapp has the sample webapp. It has the following frameworks integrated:

Again, this project can be turned into a Maven Archetype, with the mvn command.

Next Adventure:

Integrate Google Guice with Netty!