I am developing a big project for mobile as mobile sites and mobile applications which should support a wide range of platforms like iOS, Android, BlackBe开发者_如何学Pythonrry OS, Windows Mobile, and Symbian.
I chose to go with jQuery Mobile because of a lot of good things I read about it and a wide range of its supported platforms. My site and application will have a lot informational and transactional operations.
Is jQuery Mobile enough for developing such a project? And also I read a lot of developers are using Razor .NET framework for writing inline code withing jQuery Mobile. Why should I use such frameworks? And are there other great frameworks like Razor?
It largely comes down to opinion, but I think MVC 3 and jQuery Mobile work well together. I've used jQuery Mobile and MVC 3 Razor for some medium (15 pages, 5 controllers) sites, and I really enjoy it.
I've created a jQuery Mobile site template available through the Visual Studio Extensions gallery if you're interested in testing out jQuery Mobile and MVC 3 Razor together. Source is also available on the MVC 3 jQuery Mobile Project at GitHub.
Specifically, the new helpers functionality built into MVC 3 can be a productivity boost:
@helper Link(string url, string text = "", string icon = "", string theme = "", bool? isLeft = null, bool isBack = false, params string[] classes)
{
<a href="@url" data-role="button" data-icon="@icon" data-theme="@theme" @(isBack ? "data-direction=reverse" : "") class="@(isLeft.HasValue ? (isLeft.Value ? "ui-btn-left" : "ui-btn-right") : "") @(string.Join(" ", classes))">@text</a>
}
For server-side development with jQuery Mobile there's not much better than Node.JS
Lets you use the same code on client and server and can use the same jQuery.tmpl templating that you can use in jQuery Mobile. So you can keep your HTML cleaner and enforce stricter separation of HTML and code than you could with any of the .NET frameworks.
It has evented IO and is the most appropriate choice for many jQuery based sites that don't have legacy code in .NET already. Even Microsoft know it as they just invested money in Node to get the developers to create an optimised windows port instead of building off cygwin.
精彩评论