Showing posts with label Reviews. Show all posts
Showing posts with label Reviews. Show all posts

Using Infragistics jQuery Mobile Controls to Create a Mobile App

This post is written by guest blogger Damyan Petev

With the jQuery product, Infragistics envisioned business intelligence and data visualization across a range of platforms, not just one – more like every single one of them. Built on popular and largely supported HTML5 and jQuery UI and striving to provide a comprehensive toolset for development of performing and stylish applications that are to run on every device regardless of the OS. On top of that ‘mobile' was a subtle, yet dominant theme across our product line with the latest release. Touch support and metro themes everywhere!

But there’s more to it – the jQuery UI is awesome and will run on just about any modern browser, yet it was not specifically designed for mobile devices, not until recently anyway! jQuery’s Mobile framework is- still relatively fresh, but it is just what you might need – it’s touch optimized, it’s compatible with with most smartphones and tablets and other frameworks(like PhoneGap). It is designed to be lightweight and its UI controls designed for pocket-size pages and touch, but it’s not limited to that, as mobile pages will scale to the screen so it would work and look just as good on a bigger tablet and even a desktop(check out their demos using nothing but the framework). As with JQuery UI, it’s a strong cross-platform solution with a different perspective but the same goal – beautiful, powerful, universal solutions to your app problems. It sounds too good to miss, right? We thought so too…

Enter the Infragistics jQuery Mobile controls

With this release besides all controls taking on a touch-friendly nature, our NetAdvantage for jQuery family grew with specialized mobile controls leveraging the jQuery Mobile framework – the Mobile List View and a mobile version of the Rating. As explained, with them the focus is on mobile-centric and gesture-friendly UI. That means optimizations for mobile devices for stuff like better content placement and some specific interactions along with touch support – larger UI elements to interact with and specialized events like tap hold, swipes, etc.

The List view

Sometimes for small screen devices like smartphone, a full-fledged grid control would be somewhat hard to imagine and hardly optimal in terms of productivity. It’s why mobile design, while trying to fit as much functionality in a limited space as possible, must not clutter or expect to fit everything in one page. This is why the mobile framework provides AJAX based navigation between pages (and by pages I mean their mobile version and multiples can very well exist in one html file). This is also where a control such as the list comes in play – think of it as the mobile version of the grid type control – it fits the environment well, it’s easy to interact with, it can hold a lot of data and it can be hierarchical! The igListView is a widget that implements a hierarchical (nested) mobile list. Defining can be done in both in the well-known JavaScript/jQuery or using our ASP.NET (MVC) helpers. There’s also a third method that is also the default method for the mobile framework – a pure markup definition that also has some plus sides. Settings are made via the HTML “data-*” attributes that are mostly for data storage and ignored by browsers when interpreting UI. So for a list you can simple define the standard UL and LI elements and if for some reason jQuery scripts fail to load or execute the browser would still have valid UI to render.

Now that approach wouldn’t be very appropriate if you need some serious amount of data and the Infragistics Mobile ListView comes with a major data support enhancements, one of which is templating. That means not just controlling the markup of each record but also defining a single UL-LI element and point the widget to data and it will template it appropriately. The other major additions to data handling:

  • Search filtering with the added option of presets
  • Using the Infragistics Data Source means the controls can bind to a variety of sources
  • Sorting, sorting presets and groups separated with list deviders.
  • Load on Demand capabilities

iglistview_grouping_ios_default_1

The Rating

The mobile version of the rating control designed for touch means accuracy levels are restricted to whole numbers (or alternatively rounded to halves when the control is in read-only mode). The widget offers settings to control its layout along with getting and setting value, vote count and a changed value event along with the framework’s touch-oriented ones. And as expected you can always tweak the items the rating is using to some other shape or color.

igrating_ios_2

Style

As you can tell by the screenshots above we’ve designed a beautiful iOS style theme for our mobile controls. And for any of you familiar with jQuery UI you’d expect a common and powerful themeing framework to be in play for mobile as well – and there is! Our theme will style all default UI components as well and it can be replaced with one of your own. And yes, there’s a ThemeRoller for jQuery Mobile! It’s very easy to use – all mobile themes have 3 swatches that are usually used for default layouts and actions. Just like that our iOS theme has 3 swatches – a light C (default) swatch seen above with the list, darker B and the A swatch (the one with the exquisite fabric background above). I’ve made a theme myself for what was like 10 min in a metro-style attempt and I’ve included it in the demo just in case someone likes it:

iglistview_grouping_metro_3

 

A Mobile App

Let’s see how easy it can be to create a mobile app that is functional and stylish. We’ll stay on the wave of new technology for the demo and create this app using the new mobile template in ASP.NET MVC 4! What would that do is it would lay all the basic layout of the app for you – referencing all jQuery scripts (mobile included) and styles, bundling and minifying them. It would also render your Views in the mobile version of a page by marking the content DIV with data-role="page". So all left to do is add the Infragistics Mobile Loader ask for the control you need and define it. For this demo I’ll use Northwind again with two actions in the controller returning JSON serialized parts of it for an somewhat odd-styled manual load on demand scenario for the details of each list item (again this is different from the load on demand feature the igListView has which allows the end-user to request another portion of data to be loaded for his current list). Here’s the snippet for the list:

  1. <script>
  2.     $.ig.loader({
  3.         scriptPath: "../../Scripts/Infragistics-mobile/js/",
  4.         cssPath: "../../Content/Infragistics-mobile/css/",
  5.         resources: "igmList.Filtering.Sorting",
  6.         theme: "@ViewBag.Theme"
  7.     });
  8.  
  9. </script>
  10.  
  11. <ul id="actionFedList"
  12.     data-role="iglistview"
  13.  
  14.     data-auto-generate-layouts="false"
  15.     data-data-source="/Home/Customers"
  16.     data-bindings-header-key="ContactName"
  17.     data-bindings-primary-key="CustomerID"
  18.     data-bindings-text-key="Country"
  19.  
  20.     data-auto-generate-layouts="false"
  21.     data-initial-data-bind-depth="0"
  22.     data-bindings-details-title-key="CustomerID"
  23.  
  24.     data-sorting="true"
  25.     data-sorting-type="local"
  26.     data-sorting-auto-generate-sort-presets="false"
  27.     data-sorting-presets='[ {"text":"Customer ID","sortedFields":[ {"fieldName":"CustomerID","direction":"asc"} ]}, {"text":"Contact Name","sortedFields":[ {"fieldName":"ContactName","direction":"asc"} ]}, {"text":"Country","showGrouping":"true","sortedFields":[ {"fieldName":"Country","direction":"asc"} ]} ]'
  28.     
  29.     data-filtering="true"
  30.     data-filtering-type="local"
  31.     data-filtering-search-bar-field-name="ContactName,Country">
  32.     <li>              
  33.                     <ul data-role="childLayout"
  34.  
  35.                         data-auto-generate-layouts="false"
  36.                         data-data-source="/Home/Orders"
  37.                         data-bindings='{"customerId":"CustomerID"}'
  38.                         data-inset="true"
  39.                         data-generate-compact-jsonresponse="false"
  40.                         data-bindings-count-key="Freight"
  41.                         data-key="CustomerID"
  42.                         data-bindings-header-key="OrderID"
  43.                         data-bindings-text-key="ShipName"
  44.                         >
  45.                     </ul>
  46.                 </li>          
  47. </ul>

 

Note i have my theme set using the MVC dynamic ViewBag and I choose (and let users choose) a theme and call the controller action with that theme. Since I can’t put comments I’ve grouped code to be easier to see which part does what. The magic combo here is data-role="iglistview”. Also note the data source can be a link (it’s the igDataSource after all) so local JSON, actions results, services, XML, oData and so on – check! Defining header and text key are the properties in your data to be displayed for each record, the initial bind depth set to 0 will let the list know we have provided just the data for the main list (otherwise the list will ignore those layouts since child data is not loaded). Sorting and filtering are truly easy to enable with just a property and you can also customize them with presets and in them setting "showGrouping":"true causes the list to group the sorted results just like the screeenshots above. And yes you can define custom sorting functions and group comparers if you so desire, but for our basic demo there’s no need. In the child layout we again set the source to a actiong link and the data-bindings='{"customerId":"CustomerID"}' property instructs the list to include this as part of the links query so we can send the data for the right customer and the result:

iglistview_ios_details_4

This sub-page is all auto-generated for you, navigated to using AJAX, back button and history maintained!

Adding the rating is just as easy, again either through markup, helpers or initializing with script. Also as we mentioned you have the ability to now develop against specialized touch events so you can provide that little extra interaction to mobile users – we would use the long tap gesture to reset the rating and also handle the changed event:

  1. @using Infragistics.Web.Mvc
  2.  
  3. <script>
  4.     //load the resources:
  5.     $.ig.loader({
  6.         scriptPath: "../../Scripts/Infragistics-mobile/js/",
  7.         cssPath: "../../Content/Infragistics-mobile/css/",
  8.         resources: "igmRating"
  9.     });
  10.     // show the changed value
  11.     $(document).delegate("#rating", "igratingvaluechange", function (evt, ui) {
  12.         var voteCount = $(".selector").igRating("option", "voteCount");
  13.         $("#ratingValue").text("Rated: " + ui.value + " star(s)!");
  14.     });
  15.     // reset the rating on tap hol
  16.     $(document).bind("#rating", "taphold", function (evt, ui) {
  17.         if (!Modernizr.touch) {
  18.             return false;
  19.         }
  20.         $("#rating").igRating("value", 0);
  21.     });
  22. </script>
  23. <h2>
  24. some rating</h2>
  25. <P> Tap to set value, tap and hold to reset (zero). </P>
  26. <!-- Markup defined -->
  27. <div id="rating" data-role="igrating" data-value="3">
  28. </div>
  29.  
  30. <p id="ratingValue"></p>
  31.  
  32. <p> Read-only Rating defined with the MVC helper:</p>
  33.   @(Html.InfragisticsMobile().Rating()
  34.         .Value(4)
  35.         .ReadOnly(true)
  36.         .Render()
  37. )

You can get and set rating’s value and vote count at all times and the changed event offers both the new and old values along with regular references to owner and so on. Read-only mode rating converts to a smaller form (no longer need to be big enough to be touched):

igrating_readonly_ios_5

And, lastly, you can always override the default images or their locations to change the appearance of the control to match your theme. Below I’ve change the non-iOS default stars for the rating form yellow to blue to match my theme’s looks:

igrating_metro_6

Wrapping Up

If you want to build a mobile friendly app, the jQuery Mobile framework is an excellent choice and we are offering that extra functionality for you to take advantage of – hierarchical list with templating, advanced filtering, sorting, grouping and impressive load on demand features and support for a wide array of data sources and a beautiful mobile rating optimized for touch interactions to truly score you those five stars! And there’s a bonus – everything is optimized for mobile devices, but it looks and works perfectly good on a desktop as well!

I strongly recommend to take a closer look into jQuery Mobile and check out our awesome samples (there are codes in there for you to scan and try them on you mobile device too!). Also you can download a fully functional unlimited trial of NetAdvantage for jQuery and the Demo Project for this Blog – an APS.NET MVC 4 mobile application you’ve seen bits from above and should definitely try!

5 JavaScript Books Worth Every Cent

An investment in knowledge always pays the best interest – Benjamin Franklin

The dynamic web is full of interactive ‘ajaxified’ websites and JavaScript is one of the most important pillars that goes into the construction of these websites. With JavaScript frameworks like jQuery, Prototype, Scriptaculous etc. becoming popular, it has become all the more important to learn and master JavaScript, to be able to use these frameworks effectively and efficiently. To learn a programming language, the simplest way in my opinion is to purchase a good book, read it, and then put the learning into practice, a lot of practice!

Here are 5 JavaScript books I strongly recommend if you are looking out to start client-side development and master it. This collection also contains some upcoming books I plan to purchase. I have categorized these books for Beginners as well as Intermediate-Advanced developers.


JavaScript Books For Beginners



DOM Scripting: Web Design with JavaScript and the Document Object Model

image

This book is the Get-Start-Go guide for beginners with a good introduction to JavaScript and DOM concepts. Full of clearly explained practical examples (dynamic image gallery, slideshow animations, sample site) that you can use on your website, this book gets you up to speed with JavaScript and DOM in no time. I personally loved Jeremy’s tone of writing as well the presentation of concepts, that makes JavaScript look so easy. Although this book was published a couple of years ago, I strongly recommend this book as an excellent starting point for beginners. Jeremy has also authored Bulletproof Ajax that you may want to check out.


Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries

image

After you have read the DOM Scripting: Web Design with JavaScript and the Document Object Model book and have gained some level of experience with it, you should consider picking up this book. The first 4 chapters in this book are introductory chapters. The book starts getting exciting Chapter 5 onwards with examples on how to write object-oriented JavaScript. In my opinion, Chapter 8 - Coding and Design Patterns is the best chapter in this book.

As a side note, FireBug comes very handy while reading this book. The hands-on approach demonstrated in this book to write Object Oriented JavaScript code and the usage of patterns, is a reason why I strongly recommend this book.


JavaScript Books For Intermediate-Advanced Developers



JavaScript: The Good Parts

image

Douglas Crockford, as many of you already know, is a JavaScript champion and his advices on JavaScript is well known in the community, and when someone like him shares his knowledge through a book, you MUST buy it! This book is not for beginners, but for those who after a brush-up with the language and some hands-on experience, want to take their skills to the next level.

This book is to the point, well-written, sincere and does a great job of assessing the good and the bad of JavaScript. The parts where Crockford explains inheritance, invocation, scoping and closures are simply superb. If you are serious about learning JavaScript, you must have this book in your collection. Ever since I read his book, I changed the way I look at JavaScript!


JavaScript: The Definitive Guide: – 6th Edition

image

Although this book has not yet been released as of this writing, I have David Flanagan’s previous edition – JavaScript The Definitive Guide (5th Edition) with me. The 5th Edition was a very popular JavaScript book, gave a deep understanding of JavaScript and was amongst my favorites.

There’s no reason for me to believe that the new one will not be as useful as the 5th edition and this one’s definitely going into my collection. From the O’Reilly site: The sixth edition offers comprehensive coverage of ECMAScript 5 (the new language standard) and also the new APIs introduced in HTML5. The chapters on functions and classes have been completely rewritten and updated to match current best practices. A new chapter covers language extensions and subsets.


Secrets of the JavaScript Ninja

JavaScript Ninja

I am a big fan of the creator/lead developer of jQuery and a JavaScript expert, John Resig. I remember purchasing his book Pro JavaScript Techniques way back in 2007 and this is one of the best JavaScript books I have read.

I am excited about the soon-to-be-released In Secrets of the JavaScript Ninja book. In this book, John reveals the inside know-how of the elite JavaScript programmers. Written to be accessible to JavaScript developers with intermediate-level skills, this book gives you the knowledge you need to create a cross-browser JavaScript library from the ground up.


I hope you liked these JavaScript book recommendations. If you are serious about doing some solid client-side development, I would strongly recommend you to invest in these books!

A Reliable Hosting for Non-techie Webmasters

This post was sponsored by Doteasy.

There are just so many websites right now and almost every niche and type of products can be found online. But unsurprisingly, most webmasters who own these websites are often clueless on how to actually set it all up by themselves. Well, that’s what web developers and programmers are for. But unfortunately, a lot of people really don’t have the budget to hire someone. So, they either end up trying to learn things on their own or just totally forget about the whole idea.

Well it doesn’t always have to be that way. Doteasy is one of the leading domain name registrars since 2000. They also offer reliable web hosting services and guarantee 99.9% uptime to all webmasters. Their best seller is their unlimited hosting package which is only $9.95 per month and best for setting up a business online. What they offer with their hosting packages is not just reliability but also something for anyone to easily manage and set up. And this is perfect even for those who aren’t much familiar with the technical stuff.

What they offer with their unlimited hosting?

Aside from the unlimited hosting storage, unlimited data transfer, unlimited email accounts and other things, they also provide a lot of free scripts, web tools, applications and services for their customers. You can easily set up a blog, forum, shopping cart and so much more with their one click install scripting. And if you got a script of your own, they could even help install that for you absolutely free. These are just among the many reasons why their unlimited hosting plan is great. Doteasy simply makes things really less complicated and instead much easier for first time webmasters but still competent enough for end users. They also offer free email, chat and telephone support for assistance.

And if you’re having doubts about their reliability and services, you can even try their free web hosting with no set up fee or extra charges. They are one of the few who guarantees 99.9% uptime and no annoying ads or pop-ups even with their free web hosting. Plus, you still get to have free web tools and apps to help you build your website with less hassle and a cPanel control panel. With their current promo of any .COM/.NET/.ORG domain name registration for only $7.95 a year, you can start your own blog with the personalized domain name and one year free web hosting with coupon code 1003BPM (just enter the coupon code before check out). A free web hosting package like that is definitely something worth checking out.

5 Online Rich Text Editors built using jQuery

As defined in Wikipedia – “An Online rich-text editor presents a ‘what-you-see-is-what-you-get’ interface for editing rich text within web browsers. The aim is to reduce the learning curve associated with users trying to express their formatting directly as valid HTML markup.”

I was looking out for a few Rich Text Editors built on top of jQuery and here’s a compilation of the ones I found.

jHtmlArea - A simple, light weight, extensible WYSIWYG HTML Editor built on top of jQuery.

jQuery Rich Text Editor

markItUp - markItUp! is a JavaScript plugin built on the jQuery library. It allows you to turn any textarea into a markup editor.

jQuery Rich Text Editor

jWYSIWYG - This plugin is an inline content editor to allow editing rich HTML content on the fly.

jQuery Rich Text Editor

CSS3 jQuery Rich Text Editor - A web based rich text editor written using jQuery and CSS3 that supports embedded fonts

jQuery Rich Text Editor

HTMLBox - HtmlBox is a modern, crossВ browser, interactive, openВ source wysiwyg editor built on top of the excellent JQuery library

jQuery Rich Text Editor

If you know of any other editors built using jQuery, let me know via the comments section.

51 Tips, Tricks, and Recipes with jQuery & ASP.NET Controls – Review by Elijah Manor

I had written an eBook a couple of months ago called ‘51 Tips, Tricks, and Recipes with jQuery & ASP.NET Controls’. The eBook so far has received some good reviews and mentions and I thank everyone for their valuable comments!

Elijah Manor, ASP.NET MVP, ASPInsider, co-host of The Official jQuery Podcast and a famous tech twitterer recently reviewed the eBook on his blog.

Here’s an excerpt of the review:

I recently finished reading the 51 Tips, Tricks, and Recipes with jQuery & ASP.NET Controls eBook by Suprotim Agarwal. The eBook is $14.99 and it comes with a 14 day 100% money back guarantee. It can be ordered from the DotNetCurry website.

This eBook reminded me a lot of Cody Lindley’s jQuery Enlightenment in that it split it’s eBook into small bit size installments (known as recipes) that can be consumed either sequentially or on a individual basis. The recipes are organized into situations or problems that you might want to solve using jQuery. This eBook differs from jQuery Enlightenment in that it focuses on the interaction with ASP.NET WebForms, which has a unique rendering of its server controls ……

You can read the rest of the review over here