Archive for the ‘jQuery’ Category
Posted April 1, 2013on:
So how do you define what framework to use? Below you could find a few tips that could help you to make a choice.
1) If you know programming
Of course most of the frameworks expect you to know programming. Still even if you don’t know programming there are a number of app builders that allow you to create complex apps in the “drag and drop” environment. In case you are dreaming about developing a game, so GameSalad will help you: it has an intuitive Drag and Drop UI which gives you the possibility to build apps without coding. If your intention is to develop a business app, so BiznessApps will let you build the app for many scenarios.
2) Create apps in a language you know
3) How native or cross-platform do you want it?
Do you know that there is a kind of tradeoff that some of the frameworks make? For example, a HTML5 app build with the help of Sencha, jQtouch and GWT-touch could have almost native look and feel, but not 100% native of course. But if you use Titanium and Corona with native UI components, the apps will have 100% native look. The advantage of HTML5 apps is that they could be further compiled for more platforms. Plus they can also be deployed on the web without making any code changes.
4) If you are a web developer and want to continue using your old tools
Firstly, hello to web developers who are reading this article 🙂
Another advantage of these HTML5 apps is that a web developer already knows most of the technologies and has most of the tools available. For instance, if a web developer has to create an app using jQuery Mobile or Phonegap, he can use IDE which he has always been using, for debugging you are welcome to use Chrome Inspector or Firebug. If you still insist on using your trusty tools, go on with Sencha or jQuery Mobile.
5) If you select a frame by taking into consideration their “pros” or “cons”
In case you choose a framework based on “+” and “–“, so hope the following short list will be of use to you.
· jQuery Mobile
+ Great tools like Theme Roller and Codiqa UI builder;
+ View only framework (you can use whatever to handle the MC parts)
+ Based on jQuery;
+ Lots of plugins;
+ Most popular.
– Could be too heavy for some smartphones;
– No official paid support.
· Sencha Touch
+ Based on ExtJS;
+ Complete MVC framework;
+ Official paid support;
+ Sencha Architect is great.
– Some controls look off;
– No native controls;
– Few customization options;
– Client side DOM generation.
+ Rapid prototyping;
+ It’s sross-platforming;
+ Native UI.
– Increasing complexity (and costs);
– No freemium;
– Flexibility limitations;
– Native UI*.
*The native UI is both an advantage and disadvantage. If your UI is simple enough, you may be able to use a single code base. But more than likely, you will need to tweak the UI for each platform to take full advantage of each platform.
+ Single code base for all platforms;
+ Rapid testing and deployment;
+ Multiply Platforms;
+ Access basic native functionality;
+ Offline usage.
– Poor performance;
– Lack pre-built UI widgets, transitions, standard controls;
– Access advanced native functionality;
– Complex Business Logic etc.
Make your right choice my dear readers 🙂
Hope this article was interesting and helpful to you. Should any questions or comments arise, you are welcome with them.
– jQuery has vibrant and helpful community and it is easy to learn. jQuery has very good documentation, in addition there is a great number of tutorials on the web demonstrating jQuery usage. If you encounter a problem, you can ask a question on any web development forum and there will be a large development community waiting to help you :). Lots of people not only use it but also write tutorials, share their code, make plugins. Also jQuery has a very low learning curve.
– Widespread adoption. Countless big players on the Web are using jQuery: IBM, Netflix, Google (which both uses and hosts the jQuery library), and Microsoft, which now includes jQuery with its MVC framework and works with the open-source jQuery project to contribute new features to the jQuery library. Also there are thousands of big sites that use jQuery: among them are WordPress.com, Pinterest, Reddit, MSN.com, Amazon, Yandex, Microsoft.com, Instagram, Slideshare, the list can go further and further
– JQuery is simple. jQuery objects are chainable. JQuery objects return other jQuery objects and it is possible to perform additional operations in a chain. There is no need to iterate every object one by one.
– Small and clever core library. The jQuery core library is only about 24KB in size (Minified and Gzipped) so it can be easily included into your application and it`s very fast as well. That is due to the fact that a lot of fairly common functionality has been omitted from the jQuery core library, and relegated to the realm of the plugin. Also developers have even a smaller alternative: Sizzle. Sizzle library is 4 KB and it’s simplified just to be used for css selection.
– Great number of plug-ins. The reason of why there are so much jQuery plugins is that jQuery is designed to be pluggable. By including only a core set of features while providing a framework for extending the library, jQuery team made it easy to create plugins that can be reused in all jQuery projects as well as can be shared with other developers.
– CSS3 Selectors Compliant: jQuery fully supports the CSS3 selector specification.
– jQuery UI. jQuery User Interface separates out higher-level constructs and is packaged into a neat library that sits on top of jQuery. UI capabilities might not be stronger than some other libraries such as ExtJs but it’s getting better.
Hope these facts will be of use to you. Of course, the things I listed here might not include all the good points about jQuery and you may add your own points to the list 🙂
Thanks in advance!
Let`s start from the brief history of the two.
– Sending HTML page data to server using AJAX;
– Animating HTML element;
– Validating the HTML form;
– Storing user information that may help for Web Analytic, Ad tracking etc.
Mostly jQuery focuses on designers and inexperienced developers, still it could be of interest to experienced programmers as well. Here I will try to enumerate the reasons why:
1) Element’s selecting. Every jQuery operation starts from selecting one or more nodes from the DOM. jQuery’s selection syntax is an interesting hybrid of CSS 1, 2, bits of CSS 3, some XPath and a few custom extensions as well.
3) The $ function. You could say it is not true that that jQuery introduces only one object in the global namespace as there is also a $: the $ symbol is also set up as a shortcut for jQuery. This makes enough gently: if you want to back your former function $ (for example, if you have a piece of code based on Prototype), you can call jQuery.noConflict (), to return to his old the $. At the beginning you could considere the widespread using $ in jQuery is no more than a clever trick. But for some reason thinking of it in terms of the jQuery symbol makes everything seem a lot more sensible
5) Manipulating with DOM. jQuery offers a few smart ways of making large scale manipulations to the DOM. The first is quite surprising: the jQuery function can take a snippet of HTML which it will turn in to a DOM element.
6) The returned beast. Object, which is returned by the selectors jQuery, could be quite interesting. It represents a set of DOM-elements and behaves a bit like an array—it has a length property, items can be accessed by index and (most importantly) Firebug treats it as an array when displaying it in the interactive console. This is a clever illusion; the collection is actually a jQuery object, incorporating a large number of methods which can be used to query, modify and extend the collection of selected elements.
There are three principle categories of jQuery methods: those that manipulate all of the matched elements, those that return a value from the first matched object, and those that modify the selection itself. If you have Firebug you can try these out interactively: use this Insert jQuery bookmarklet first to load the jQuery library in to any page, then paste the code examples in to the Firebug console. I would like to note a convenient symmetry of these methods: they are used for display attributes (taking 2 arguments passed to or from a number of properties of the object), and to read the values of these attributes (if only one argument). This symmetry is used throughout jQuery, which greatly facilitates the storage API.
8) jQuery and Ajax. jQuery has the best API for working with Ajax. The most simple form of an Ajax call looks like jQuery(‘div#intro’).load(‘/some/fragment.html’). This performs a GET request against /some/fragment.html and populates div#intro with the returned HTML fragment. It’s a neat shortcut, but what if you want to do something more advanced like display an Ajax loading indicator? jQuery exposes custom events (ajaxStart, ajaxComplete, ajaxError and more) for you to hook in this kind of code.
9) Extensions. Considering the whole set of features as standard, it is worth noting that uzhaty jQuery version is only 20 KB, and even less if you use archive (. Gz). Additional functionality that extends beyond this delivery can be arranged with the help of extensions that can (and do) to add new methods to an existing jQuery. If you want, you can do something like this: jQuery (‘p’). bounceAroundTheScreenAndTurnGreen(); The extension mechanism in jQuery provides documented methods for adding them to the system. Simplicity and ease of use have attracted a large community of authors such extensions, the extensions directory has more than a hundred examples. Another nice feature is the ability to add your own selectors as well as their own methods. MoreSelectors expansion adds methods like div: color (red), which, for example, selects all div with red text.
10) Several words about leaky abstractions. When studying jQuery with more respect, you could struggle with one philosophical blocker. In certain cases, jQuery uses a truly unique methods to achieve a particular function: some parts (such as source code selectors) of this library look scary. If you do so , it requires an understanding of how the library works. To understand this, you need to know some basic concepts, the differences between browsers and a set of methods, which the library uses to get around them. No library can protect you 100% against weird browser behaviour, but as long as you have a grounding in the underlying theory you should be able to figure out if a problem stems from your own code, your library or the underlying implementation.