Play framework with Google App Engine, will this destroy scalability? - java

Could I get some advice on what is the better way?
My questions regard Play framework, Google App Engine and web development.
So I am about to start writing a website which (the hope is) will be become quite popular and therefore will need to scale. I have heard from more experienced developers that my system will not work (a play framework on a VPS backed by Mysql). Apparently this just does not scale. Especially if storing and searching through many
It has been suggested that I use a system like Google App Engine (GAE) that handles all the scalability aspects. However I am just starting to realise that this means a different mind set (Application Centric).
My main question is whether I should still use play framework? The default way of using GAE is using plain Java servlets but I have found a plug in that allows play to interact with it. I like working with play but I am worried that this will diminish all the benefits of GAE scalability rendering the effort in porting my application to GAE useless.
Can anyone give some advice?
Update - to further explain:
I was worried about using components that play framework provides such as sessions, cookies, etc. I am assuming that these will not be scalable unless I use the GAE api directly? I have heard that storing state like sessions is not very good and I should use the provided APIS. Or does Play's plug in already handle this?
Also,
Cheers

Related

designing android app backend

If I need to design an entire android app and host my app on google play, and my users need to get real-time data, how would I go about designing the backend.
I learnt few things about views, view groups, layouts, event listeners in java, programming in latest android studio. But I'm just in the learning phase.
Is there any other better IDE. Can we program in atom, does it has any package that can emulate android phones.
Mainly I'm concerned about the DB choice, frontend-backend communication. Is there any service which is open source for hosting in the cloud that has a great uptime and supporting easy scaling. Of course, I can google each and everything, but those will be on different perspectives. I just wanted some answer which is tailor made and easy to understand.
This question could definitely result in a myriad of answers and approaches. But, in terms of something straightforward to maintain (considering you have Go tagged in the question) I would recommend checking out the following:
For using Go, I have found Echo to be a pretty awesome framework to bootstrap Go web services. It offers a very flexible and performant router that uses a middleware design pattern, as well as a lot of other nice features.
For hosting and maintaining your web services, you should look into using Heroku. They have a pretty amazing platform that officially supports Go deployments. You can start for free, and then scale up your services pretty effortlessly. They also offer myriad of third party integrations for monitoring, logging, emails, sms, and databases.
In terms of databases, that one can't be answered really without a significant amount of knowledge around what you are doing with your data - but using Heroku, you can spin up a PostGres SQL instance, MongoDB, and Redis for free. For what you are doing it sounds like a combination of the above might be useful for your needs.
In terms of Android development - I have not found anything better than Android Studio. It's free, provides all the emulators you could ever need, and in general all the features you would want out of an IDE to do Android right, plus it is maintained by Google.
Good luck!

Web-based System in Google App Engine

Is it okay to develop a company's system in google app engine? The system will just have simple CRUD functionalities and should be used only by customers of the company.
Another option is to have it written in PHP CodeIgniter.
I am more experienced with google-app-engine.
Which one should I go through? Thanks.
Have look at the case studies given at this products, This could definitely clear your picture in all prospect.
App Engine is great when you can delegate part of the processing to the clients. So It's more designed for web apps - RIAs (something easily called "Google-like web pages").
PHP, on the other hand, is a server-side script, just like JSP, ASP and so on. So you have different worlds to deal with. My 2 cents: for simple CRUD, use the fastest approach for you to develop it, in this case App Engine with the technology you're used to.

experience with Vaadin touchkit

I´m soon to start a new mobile app project and I dont have that much experience with either iOS or Android development but I have used Vaadin for presentation tier on different occasions.
The app will most likely be lightweight for the mobile client but more heavy for backend servers(jboss). I feel kinda lost so i´m asking you.
Question: What are the drawbacks of using Vaadin touchkit compared to other frameworks/ build from scratch? Where might a problem occur? Any input and recommendations are welcome!
I am currently developing a small application using Vaadin TouchKit that once it enters production will have some hundreds of users. I haven't been able to locate any publicly available apps in production that have been implemented using Vaadin Touchkit, so what I'm going to list here is based solely on my personal experience with the technology.
Drawbacks compared to native applications:
I'm assuming this is what you refer by "building from scratch".
As this is web techonology, your application performance will always correlate heavily with the quality of the users Internet connection. If you have to render large UI's with a lot of components and details, it will be slower than doing so in a native application. A lot slower if the users connection is poor. Or if a connection is unavailable, then your application pretty much becomes unavailable. There is a way to use HTML5-cache for providing an offline-mode in a Vaadin Touchkit app, but it is not very useful for storing large datasets as the cache has a lot more limitations than for example an Android SQLite database. For simple UI-stuff it might be viable, but storing data for offline-access is in my opinion pretty much out of the question.
Other than the above mentioned points, I have not run into any missing capability, as you can use any Java library at any time on the server-side, and your application will be running safely in a servlet container.
Upsides compared to native applications:
You didn't spesifically ask for the upsides, but I guess this is any input and recommendations.
Your Vaadin Touchkit app can run on basically any mid-high tier mobile device launched after 2010, basically excluding only the ones with Windows Phone OS, since Internet Explorer does not use WebKit for rendering and other browsers are not available as far as I know. And since this is a web application, it does not exclude any other desktop browsers than Internet Explorer. By creating one application, you support roughly 80-95% of your users.
As mentioned, any Java library, any internal API, any authentication method supported by your hosting environment is available to your app, which is not as easy to implement for native mobile applications. This can be overcome with great software engineering, but demands a significantly higher amount of developer resources, not to mention that you are still stuck doing it for each platform separately.
And of course maintenance of a servlet app compared to the maintenance of a native application is considerably more simple: deploy once, all users get the changes without doing anything. No app store, no versioning, no hassle.
Vaadin TouchKit compared to other web development:
I am not familiar, at all, with web application development without using Vaadin, so I am not going to tell you whether or not it is the way to go compared to other modern web application technologies and frameworks. All I'll say is that in my experience Vaadin makes creating UI's and backend functionality relevantly easy and more graspable if you are familiar with Java development and desktop application development in general.
To conclude, don't rush in to create your mission critical application using Vaadin TouchKit before at least prototyping with it, and getting to know the performance and limitations it presents. For certain type of applications, it might be one of the best solutions. For a certain, larger group than the other, it is probably one of the worst. It is not a very mature or generally adopted framework, but it is useful. I'll be happy to hear more about the type of app you're planning and help you figure out if there are any showstoppers for using Vaadin TouchKit.
P.S. You've probably already run into this, but this document opens up the guts of one of the TouchKit demo apps:
http://demo.vaadin.com/vornitologist/VAADIN/tutorial/touchkit-tutorial.html
I just tried out vaadin touchkit examples on my android phones, well now I got affirmation why I prefer native software over html in some cases. Try it out - dont be confused by nice-looking styles, just try to USE it, this is what apps are made for. In my case I cannot withstand non responsive GUI or not smoothly scrolling lists. Again, for a simple gallery - a JavaScript/HTML solution is just perfect :) So the right way is the hybrid way! (imho)
Vaadin Touchkit offers very good user experience and provides wide range of UI components to apps.
Its default iOS theme provide almost iOS like UI and it also offers many other themes too.
But this will not run as smooth as platform specific mobile apps. as ultimately it will not completely leverage the real power of mobile platform features as finally it is going to run in a mobile web browser. as compared to native mobile apps
Find more detail on vaadin touchkit and comparison with similar technogies like ZK Mobile and native platform specific apps. : http://jtechnoprojects.blogspot.in/2012/12/vaadin-touchkit-vs-zk-mobile-vs.html

Suggestion : Java server implementation for web application

I know this question might be repeated many times but would really appreciate any suggestions. I am working on developing a web application in java (server side). The client is developed in javascript and html5 (another guy) and i want to make the developement independent. I have been using java for quite long but have no experience in web development. After endlessly going thorugh many forums and articles i am so confused.
The web app is pretty simple one with options for user to login and upload some data and access those later.
I started with basic sevlets and JDBC APIs. The web application is not very complex one
Currently i have servlets for each resource to handle post and get call on them.
The suggestion i am looking for is do i need to use some framework to make it better. There are so many like springs, playframework, wicket etc.
Any link to sample web applications developed just usin servlets apis will also do a great deal to me
Thanks in advance for the suggestions
I don't think you need any framework. As you said your app was pretty simple one. A java Framework could make a complex app organized. But would make a simple app complex.
However, if in the future, you want to extend your app further more. you might need a framework. The most famous web frameworks in java are SSH(spring, struts, hibernate), you can find a lot of materials easily, so I won't dive into the detail here. SSH frameworks are not easy, avoid using them if you app is not complex enough.

Best server-side framework for heavy AJAX Java application

There are zillions of Java web application frameworks.
95% were designed before the modern era of AJAX/DHTML-based development, and that means these new methods are grafted on rather than designed in.
Has any framework been built from the ground up with e.g. GWT + Extjs in mind?
If not, which framework has adapted best to the world of forms with dynamic numbers of fields and pages that morph client-side?
Echo2 / Echo3 by Nextapp (www.nextapp.com) is totally awesome.
Advantages over GWT:
1) It is not limited to a sub-set of java like GWT
2) It is easier (in my estimation) to learn
3) Has extremely robust design studio for almost drag and drop designing.
4) It is very fast, and works very well on all platforms browsers
5) You can write your application using either java script or java
6) It has great and straight forward methods for handling events and actions.
Personally I think that for any web-application in which you are trying to integrate java and speedy delivery I wouldn't hesitate to pick Echo3 or Echo2.
If you're starting from scratch. I'd have to say Google Web Toolkit. I have to say it is incredibly powerful. You get keep using most of your Java tools. Plus, you don't have to duplicate code that exists on both the server and the client, it just gets compiled differently for each area.
I'd consider REST-style frameworks as well as the other recommendations here- Restlet or Jersey may be good choices for the backend, while you use something like JQuery or GWT on the front end. Both frameworks can easily produce JSON, and the REST style provides a nice clean line of demarcation between your client application and your server source; I find that JSF can make that demarcation pretty muddy.
I use JSF and IceFaces. Although JSF has a few limitations, IceFaces seems to work pretty well and has ironed out a few of the problems with JSF.
I haven't used a really good AJAX Java framework as yet, although Echo2 looks interesting.
I like the stripes framework. It lets you use whatever javascript toolkit you want.
Here is their documentation on AJAX
GWT is quite powerful and easy to use (all Java, no Javascript/HTML/CSS coding). If Google has their way it will be a dominant framework/tool in web applications development, and for good reason. It already works with Google Gears (which allows offline access to web apps) - and more than likely will be optimized to work within Google Chrome.
DWR
I use this to dynamically populate drop downs, and even filter them on the fly based on user input in other places on the form.
I like the combination of JBoss Seam and Richfaces, especially with the JBoss tools that are extentions to Eclipse - makes building these sort of RIA's incredibly easy.
Wikipedia contains some useful comparisons:
Comparison of JavaScript frameworks
List of AJAX Frameworks
Your choice depends on several different factors including whether you want the "work" done client-side (most javascript frameworks) or server-side (echo2 etc.). Other things worth looking at are tools like OpenLaszlo that provide Flash (I think) out of the box, but drop back to DHTML if there is no Flash player present.
Unfortunately I think the decision comes down to balancing several competing cocerns. Check out the comparisons and try them out - most come with online demo's for you to try.
Aptana has a server side frame work called Jaxer. This is from their site:
Jaxer's core engine is based on the same Mozilla engine that you'll find in the popular Mozilla Firefox browser. This means that the execution environment you use on both the client and the server are the same. It's Ajax all the way through and through. That means you only need one set of languages -- the languages that are native to the browser -- to create entire applications.
This framework is open source and has a very nice IDE based on Eclipse. Aptana is also working on a Javascript implementation for ActiveRecord called ActiveRecordJS. Potentially you could use this both client and server side with their framework.
GWT is one of the best AJAX framework that I used ever. Most important thing about this framework is that its maintained by Google. And Everyone know "Who is Google ?"
GWT is used by many products at Google, including Google AdWords and Google
Wallet. It's open source, completely free, and used by thousands of
enthusiastic developers around the world.
GWT provide rich widgets that can be used to built any application. Almost all the widgets they have.
Another important point is GWT is continuously developing and its also have stable release which is very good thing. Another thing Google has also released GWT-Material which is again a very good thing because everyone is moving toward material.
I hope this will help you!!!

Categories