JSF vs Flex - visual-studio

I want to settle on a GUI framework, and use AJAX, as simply as possible.
Assuming adequate skills in both JSF and Flex, but not too skilled at AJAX/javascript, and assuming Java as the language for the application, and using a DB, which is a good choice, or both have equal set of pros/cons?

Try using Richfaces. As RichFaces library will provide ready made Ajax Enabled JSF Components. You can use them in your JSF Application.
RichFaces is a rich component library for JSF and an advanced framework for easily integrating AJAX capabilities into business application development. The RichFaces components come ready to use out-of-the-box, so developers can immediately save time in taking advantage of component features to create Web applications that provide greatly improved user experience more reliably and more quickly. RichFaces also includes strong support for the skinnability of JSF applications. RichFaces also takes full advantage of the benefits of the JSF framework including lifecycle, validation, and conversion facilities, along with the management of static and dynamic resources.
http://www.jboss.org/jbossrichfaces/

...and the pros of Flex are:
Flex Framework-built SWF files runs in the Flash Player JIT, which is 100x faster than browser-native JS, unless you've got a JS Jit-enabled browser which uses SquirrelFish, for example. So user performance may vary considerably, whereas the Flash Player works at the same performance across all browsers, all platforms.
The Flex Framework is open source, so you can customize it to your heart's content. And since it runs on the Flash player, it runs the same everywhere. Unlike an AJAX framework, where you usually have to be highly expert at browser compatibility coding to customize it.
Flex tools are also free, as the Flex SDK is open source.
Having said that, you can code desktop apps in AJAX using Adobe AIR, without using Flex or ActionScript, if you want to.

How to make HTTP requests with Flex:
http://www.adobe.com/devnet/flex/quickstart/httpservice/
AJAX using JQuery (one of many JS frameworks):
http://docs.jquery.com/Ajax
Both of these are pretty simple once you've played with 'em a bit. You specify a URL and a callback function to read the text response once it's finished loading. Assuming you're familiar with the pros of Flex, the pros of JS are:
It doesn't require a browser plugin
You don't weigh down the page with the Flex framework.
You'll probably find more developers in the market who are familiar with it because the development tools are free and the code is usually visible to anyone who wants to learn from it.

Related

ajax control vs bootstrap

I've been researching the use of Bootstrap for my next project. The controls that it implements seem to be very similar to those in the AJAX Toolkit. I was then wondering if this was a new evolutionary path that I must consider or just a branch in terms of using script-based programming or more traditional .NET/C#/JavaScript based approach.
Will AJAX still be viable for web development?
If I use a non-MVC/ASP.Net approach, should I use Bootstrap or AJAX Controls?
Thanks in advance for any insight you can give me.
Ajax is very viable for web development. It is built into frameworks like jQuery. It may be confusing though because you see the term used in things like the asp.net ajax control toolkit, which do a lot of interesting things client-side. A lot of those client-side things like the modal popup exist in other scripting libraries like jQuery UI and Bootstrap.
Separate the real purpose of AJAX which is to perform asynchronous communication with the server and ignore the other items that get confused with AJAX (like the aforementioned AJAX control toolkit).
Bootstrap is a responsive design framework. It has lots of built-in components such as the modal, tab, alert, etc.. Don't confuse these with AJAX either, they're just great client-side functions. The AJAX control toolkit also has similar features, but few parts have much to do with true AJAX other than the fact they make use of scripting features introduced in 2008 with the System.Web.Extensions namespace. Things like the $find() method.
Look at Bootstrap to focus on the UI, it's presentation, and some interaction components. Use the parts that make sense to you. If you have an Ajax Control Toolkit modal that works in your application just fine, you don't need to replace it with the Bootstrap modal as you may need to do other things to get the two to behave the same. Bootstrap is an awesome framework for client-side development, and can easily work with ASP.Net, though it's easier to do with MVC simply because of the design principles of MVC versus Webforms.

Advantages and Disadvantages of Using Ajax on public page

I want to make a project like the Symptoms checker like WebMD did it
WebMD Symptom Checker
i want not logged in user to interact with it.
I dont want to make it in FLASH like webmd did it, i want to make it using JQuery and Ajax,
What is the Advantages and Disadvantages of doing a project like this using Jquery and Ajax , well, i will be implementing it using Zend framework
Does Ajax Requests on a Project like this and its on a public page affect on website security ? Does it affect on SEO ? What the disadvantage for using Ajax on this project
Well I don't know what you mean exactly by advantages and disadvantages but I think you mean that you want it implemented in HTML5 instead of Flash.
Flash strengths:
Flash is more ubiquitous (most of desktop users).
The Flash developer community is large and mature.
The developer tools are strong and well supported.
Designers are more comfortable in working in flash.
The 2D and 3D APIs are more mature and usable than Canvas.
Flash gives you better access to web cam and and audio recording.
Flash better supports streaming, secure and live
video.
Flash weaknesses:
Information embedded in Flash is often invisible to search engines.
Website reporting on Flash navigation is problematic and cumbersome.
Flash breaks web usability standards.
Lack of consistent cross platform support (not all devices have the same version installed).
Code embedding Flash objects doesn’t pass w3c validation.
Some users disable Flash to avoid flash based advertising.
Website updates continually require Flash skills.
Flash breaks Search Engine Site Previews.
Flash doesn’t work well with Mac OSX, and Apple’s mobile devices do
not support Flash content.
HTML5 strengths:
Better suited for mobile devices (lower battery consumption).
HTML5 uses DOM and HTML support, so plug-ins and 3rd party programs
are unnecessary for video and audio embedding.
Websites with HTML5 elements have greater consistency in terms of the
HTML used to code a page on one site compared to another.
More descriptive semantics
Richer Media Elements
HTML5 is the future.
HTML5 weaknesses
Only modern browsers support it.
The language itself is considered a work in progress
Rich media has to be compressed in multiple formats in order to be
compatible with most browsers.
You have to work with JavaScript
Of course you will find many libraries to aid you will using html5. There are great libraries out there other than JQuery such as Modernizer
The only problem I think that Zend framework might cause will working with HTML5 is that it still doesn't support the new HTML5 inputs.
UPDATE:
AJAX has no difference when it comes to security than the normal http request. Almost all security risks that can be expoited through normal http requests can be done using AJAX, so the ways to mitigate these vulnerabilities are the same.
As a general rule, search engines do not crawl content generated by JavaScript or Ajax. The most notable exception being Google's crawlable Ajax. But that only applies to Google and even then that's a bad idea.
To make your game more search engine friendly you will need to make content available via static links. Without these you essentially have a one page website which is very difficult to rank well. But it can if you obtain enough incoming links which is possible if your game is very good.

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.

Web technologies in GUI apps

What's your experience in using web technologies (HTML, XML, CSS, JavaScript) to implement part of the functionality of a GUI application? Pros and cons, please.
No servers, relational databases, AJAX, or cookies for session management, nor an existing webapp either, but rather a GUI app that uses web widgets (like Qt WebKit) to render and handle substantial parts of the UI, while taking advantage of a GUI framework to achieve an even richer interaction and better desktop integration.
I've already validated that the approach is possible using PyQt. Content can be rendered from the file system or from strings, and URL requests (images or clicks) can be captured and served by the form's event handlers. CSS and JavaScript are supported, perhaps with some limitations.
# ...
self.webView.page().setLinkDelegationPolicy(
QtWebKit.QWebPage.DelegateExternalLinks
)
#...
class TotiMainWindow(QtGui.QMainWindow):
def linkClicked(self, url):
pass # events arrive here
Note: This question is different from this one and this one made before, among other things because there is no requirement to use web technologies on the GUI, but there is the requirement that the application should work without a network connection available, and should integrate well with the default desktop over different platforms, without previous infrastructure requirements (no .NET, Java, browsers, or database servers).
Note: I posted a different version of this question on PMS but found very little experience with this approach there.
Closing Note
I just found most of the information I was looking for in a series of blog posts by André Pareis.
I think the largest advantage to using web markup like HTML/CSS and other web technologies is that desktop apps may very well have their days numbered.
As we speak, Google engineers are working on the Chromium OS, which essentially consists of a single GUI application... the browser...
Now, while nothing may never actually come of it, there is clearly a rising trend in the number of applications accessible through a web browser, accessible anywhere. It seems to me that this is the future of application development.
By using these technologies, this becomes one less headache you have to deal with when or if you determine that your app should be available as a web application.
Update: A few years ago, we developed an Agent Desktop for our call center that is essentially a local application that opens sockets to integrate with the phone system. The user interface the agents use is built with HTML, CSS, and JavaScript, and the experience is stunning. When we released our latest update in 2010 with a professional CSS redesign, our agents were all very impressed with not only how easy it was to interact but also how easy it was to use.
In the future we will port this 100% to the browser, but for now it needs to be a local application because of the COM integration with the phone system.
We did exactly this for a project back when Windows XP was new.
This gave my team several benefits:
A good-looking UI with relatively little effort
Easily change the style of the UI in a consistent manner using CSS
Relatively simple integration with C++ (invoking functions from the ui and vice versa)
The drawbacks we saw were:
Some not-so-good firewalls considered accessing internal resources (ie other html pages in the ui) to be a web request
Adding and accessing the needed resources could in some cases be a bit cumbersome
It was possible set properties in Internet Explorer that would prevent JS from running in the application
Note that some of Windows XP:s programs are using this approach.
This probably works best with small, more Wizard-like parts of the ui (which our ui consisted almost entirely of).
I have since then not really been involved in ui projects, so I cannot really tell you whether this approach is still valid... I know that MFC-based applications will let you use HTML-based dialogs though.
In a similar situation in 2005 I created a stand-alone webapp using XForms, CSS, JavaScript, XML and XML Schema for offline data retrieval and verification. With a good XForms -> HTML + JS transformer (Chiba) it did the job with no bug fixes after the initial release. It was used for 6-12 months (IIRC) by about a dozen engineers for a project gathering test data in the tunnel of the Large Hadron Collider. The biggest surprise of that project was just how much you get for free when going for a web platform, even for offline use. Highly recommended.
The major problem is that it reduces your development speed, or the quality of your user interface. A lot. Unless you're using Seaside, it is much faster to develop a desktop app.
There is quite some number of applications built on top of Mozilla platform. It isn't 100% web technology, as instead of HTML you use XML based XUL, but the rest is indeed web stack (JavaScript, CSS). The most successful of these it the OpenKomodo and it's commercial big brother Komodo IDE.
On the other hand, as far as Qt goes, the newest version 4.7 you can build GUI using QML language. Don't let the name mislead you, it's not markup, it acctually JavaScript with app-specific extensions.

Resources