Which are the J2ME MVC frameworks? - model-view-controller

I have to do a quite big project in J2ME for school.
I didn't used 'till now J2ME, so are there J2ME MVC frameworks
for which I can find books or at least very good online tutorials?
MVC is what I'm looking for because we have to do unit testing and
I'm familiar with MVC from ASP.Net MVC, Rails and Grails.
So, any good framework to use with this project?
We are developing this project for Blackberry cells.

With Java you don't really need a framework, creating MVC-based apps is just about using the principles correctly, so having controllers dictating the response to any action and so on. I'd think about using Observers to help by having your views observe your models and controllers observe your views (to get events and so on.) Unit-testing this then becomes quite simple.

If only, the fact is that every handset is very different - its extremely difficult to build an app that spans all the major J2ME-capable handsets that looks half way decent by following the basic principles. Which is why we end up doing things like using sprite based fonts (ugh). I don't think I've ever worked a mobile project using J2ME where we've managed to stick to just the standard J2ME (and, we try very hard). Even things that should be standard, like reading a JSON feed from a server, persistent storage or even really simple things like sprite rotation is really not very standard at all (yes, I'm looking at you RIM). And, then throw a requirement for Android into the mix and you're done.
I've used Polish, and its really very good. Commercial license is not cheap (but worth it), but for a school project its free. Flash (cough) is also a good alternative too. These days, personally, I find my projects need to span iPhone (Objective-C), Android (Java), Nokia (J2ME) and Blackberry (pseudo-J2ME) and it gets real tricky to not use a commercial framework (or roll your own, if you've the time and inclination). I'm open to ideas for frameworks that span all those platforms?

I'm not sure anything like this exist, as mentioned by previous poster, you just follow the principles of the pattern. However, look at J2ME Polish, it's a very nice framework which makes your life with mobile java much easier. Particularly strong features they offer is the usage of CSS for displays - this gives you pretty good "V" part in MVC pattern.

Related

Xamarin cross-platform user experience vs. native development

I am trying to evaluate whether Xamarin would be a good option for my project. The project is a large, complex app for Android and iOS with a lot of client-server communication. The user interface is a major focus and has to be really fast and smooth. Also, we plan to make large use of UX graphic effects (comparable to the Spotify app).
For now we are planning to go for two separate native apps using Java/Objective-C. However, the possibility of cross-platform code sharing would be very convenient for us of course.
Most opinions I've heard so far say that Xamarin - although far better than HTML5 apps - cannot match the UX of a native app. Also, I tested the following applications made with Xamarin (on Android):
Rdio
MarketWatch
Busch Gardens Discovery Guide
Sqor
Storyo
From my impression, none of them could quite match the speed and smoothness of a good native app.
If our focus is on a top notch user experience, would Xamarin really be a viable option? Can it really match a native UX? I am particularly looking for opinions from developers who have experience with large and complex cross-platform Xamarin applications. A few critical voices would be very helpful.
Thank you a lot!
I'm on the Rdio mobile development team, so I can make some personal reflections from that standpoint.
Xamarin allows you to write native applications in C#. Any slowness, jankiness, ugliness or bad-appiness usually has nothing to do with the Xamarin layer itself.
You save some time being able to share core business logic between your different clients, but you're still writing the UI from scratch, specific to the platform. You're just writing it in C#.
But while you save that time, you're spending it in other ways. All of those SDKs you want to use probably aren't compatible with Xamarin out of the box. You won't be pod install'ing that iOS framework, and you might be reinventing the wheel for handfuls of things. Xamarin takes advantage of the NuGet repo so you have a library of components that handle many of the things most people need (Analytics, Testing, Facebook SDK, JSON parsing, Database, etc etc) but it doesn't cover everything. And it certainly doesn't cover stuff that's out the day of an Apple or Google product announcement.
Any 3rd party code that you do want to import into your project will be done through writing custom bindings. While not usually difficult, it is time consuming. Xamarin has a team of people that specialize in assisting you in this. This fact speaks to the process being messy at times.
So while the slowness, jankiness, ugliness or bad-appiness probably isn't the fault of Xamarin, it might be the fault of you spending time in places you normally wouldn't, or not being able to take advantage of features you normally would. If that 3rd party partner SDK is giving you problems, your troubleshooting may take twice as long because there's a layer that you don't control.
UI is a wash. You're writing it from scratch anyway.
Business logic is shared. Depending on the app that might be a win if you architect your application to take advantage of it.
Compatibility / bleeding edge ability will be lacking. That might not matter to you at all, or you might be the person wanting to take advantage of that hot new API in the next OS release the day it's announced.
My personal thought, without knowing specifics, is if you want to build an application that you plan on being around years from now, and that will take advantage of the latest and greatest, I'd tell you to write natively for each platform. Unless you can really see huge gains in sharing that business logic the upfront gains are minimal. Or if you really like C#.
Xamarin uses native controls. So you design a fully native UI per platform. The users can't see that your App is made with Xamarin or Java/Objective-C.
There are sometimes performance issues in conjunction with the platform independent UI wrapper Xamarin.Forms. But you're not forced to use it. When you have still performance issues in your Xamarin.Android or Xamarin.iOS app then you produce them in your code.
There are benchmark results for Android apps comparing Xamarin.Android and Java apps: Does anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?
As you can see Xamarin's internal performance became better and better over the time.
Conclusion: Yes, you can write smooth native Apps using Xamarin.

Can the Model View Presenter be used in a native desktop application?

I'm just starting out on GWT, and I came across the MVP (was actually trying to get ahead of myself..get a little motivation). I already have a desktop application that I want to modify, can a desktop application use the MVP? and if the answer is no, what components and or classes can be used to simulate having a model view presenter?
You cannot compare GWT and MVP: they are totally different things.
GWT is a toolkit that allows you to write desktop-like web applications in java.
Some years ago, Ray Ryan from google gave a talk at the Google IO where he presented an effective pattern to code web applications using GWT. This pattern is MVP. It was not invented by google, it was already there. It's just fit for purpose when you come to write desktop like web applications. At least, this is what Ray Ryan proposed in his talk.
As far as I know there are 2 most famous implementations of the MVP in GWT: Acticivties and Places (Google) and GWTP (Arcbees). You can also create one yourself as exercise, it is not too complex. The main concept is having the view as dumb as possible and put all the business logic in the presenter. The View and the presenter collaborate through an interface. Ok, easier said than done, I'll give you that. But you can google for more.
So yes, you can write a desktop application using MVP.

What is the best HTML5 framework to do both Web AND Mobile applications with Java Spring

I know there is already a lot of discussion here, but things change quickly and new frameworks are published.
I am looking for a robust HTML5 framework with which I can create both, Web AND Mobile applications if possible. I do want to create an application for the Web and Mobile (Android/iOS) and I do not want to use two or three different HTML frameworks.
On the server side there is Spring with Hibernate (Java EE application server). I know there is Titanium, Phonegap, GWT, Grails, jQuery, SpringMVC and much more. However I am not sure what to pick and if I could to Web AND Mobile with those. Actually I am not sure if it makes sense to look for one particular framework that can do both, but I assume from a learning perspective it might be right. I also know there is Adobe Flex which runs in a Flash Player on the Web and on Mobiles, but I do not want to use Flex (because of the Adobe announcement yesterday, I think Flex/Flash has not future on mobiles).
Ideally the framework should be well documented, robust and have a good community.
Thanks!
Maybe MoSync is a good choice for you in MoSync you can combine HTML5 with C/C++. So you get the best of two worlds, HTML5 and native.

Capuccino alternative with a comparable looking UI?

I'm looking for a set of Javascript based UI components for a web app I'm building and have found that many of the best looking web apps were built with the Capuccino framework; see http://www.getflow.com/, http://www.picsengine.com/home/ and http://timetableapp.com/ for examples.
However, I'm not a Cocoa developer and have no interest in learning Objective-J. Ideally, I'd find a set of components that provide the visual end result of Capuccino apps without the underlying weight of the framework.
I have seen the Aristo jQuery UI them (http://taitems.tumblr.com/post/482577430/introducing-aristo-a-jquery-ui-theme), but jQuery UI just doesn't seem to have the depth of components available in Capuccino.
I realize this may be a long shot, but I figured it can't hurt to ask. :)
Thanks.
As another option, there is jQuery UI: nice if you are already familiar with jQuery, with the plus side of not being too heavyweight, but may not have all the components you need pre-defined. A nice thing is that it encourages to write the HTML in a way that degrades gracefully when your application in older browsers.
Maybe sproutcore is an alternative for you, although it requires you to hand-code everything in javascript from scratch. It offers most basic components and is easily adjustable to your personal design goals. Sproutcore is used in Apples Mobile Me and in some other big projects.
Another possibility might by vaadin which offers a rich set of prebuild controls and is based on Googles GWT javascript compiler. But it only makes sense if you are developing in a java environment.

JavaScript developer looking for inspiration from frameworks such as cocoa

I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions.
As we've gone along we've implemented some very useful design patterns such as Passive View MVC, Observers, bindings, key-value observers (cocoa). I have recently got a lot of inspiration from the work of SproutCore and Cappuccino which are both JavaScript web frameworks inspired by Cocoa.
Obviously all of the problems that developers are having now in building complex web applications have been solved by desktop developers many moons ago. As few months ago all I knew about Cocoa was that is was some Apple thing, now it has had a big impact in the way I develop my web applications.
I was wondering if anyone who has more experience in building desktop GUI's than I, could point me any other frameworks out there which may also give me inspiration in terms of design patterns and structures to use for my JavaScript web applications?
I really don't care what languages or platform these frameworks reside in, as long as they can teach me something about good application design in general.
Fowlers GUI Architectures seems to be a reasonable survey done at a high level, I don't know how complete it is, however.
Have you taken a look at Cappuccino? It's a Javascript client-side framework, very heavily inspired by Cocoa. The Cappuccino creators even wrote their own Objective-C runtime in JavaScript so that Cappuccino apps can be written in Objective-J, an Objective-C-like syntax for JavaScript.

Resources