Helpers for client-side librarieshttp://forums.asp.net/t/1196646.aspx/1?Helpers+for+client+side+librariesSun, 23 Dec 2007 12:35:47 -050011966462070542http://forums.asp.net/p/1196646/2070542.aspx/1?Helpers+for+client+side+librariesHelpers for client-side libraries <p>Hello,</p> <p>With ASP.NET MVC&nbsp; we are going to lose some of very powerful control suites (like Infragistics, DevExpress, Telerik, ComponentOne etc).<br> The vendors will not likely support MVC very soon.</p> <p>So the best options for now is to stick with some JavaScript library. My preferences are:</p> <ul> <li>ExtJS</li><li>jQuery</li><li>YUI</li><li>Protoype <br> </li></ul> <p>Does somebody write helpers for these libraries, especially for ExtJS?<br> Some people did it for MonoRail and ExtJs if I can remember correctly.<br> </p> <p>There is lots of stuff in ExtJS to wrap in &quot;Helpers&quot; I think.</p> <p>BTW, if somebody would consider writing such helpers, please keep in mind jQuery and ExtJs (I really like this one) are on top of the popularity :)<br> http://dnagir.blogspot.com/2007/12/2007-ajax-tools-usage-survey.html<br> </p> <p>Guys, what do you think about this?</p> <p>Cheers,<br> Dmitriy. <br> </p> 2007-12-20T13:47:23-05:002070595http://forums.asp.net/p/1196646/2070595.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>&nbsp;I wish the final ASP.NET MVC will not make us lose all of those web controls.&nbsp; I believe those controls are one of the most valuable parts of ASP.NET, if ASP.NET MVC just become something like those raw MVC framework, e.g. structs, RoR, it's a terrible loss. </p> <p>The best solution is to keep MVC and original ASP.NET stuff completely compatible. &nbsp;</p> 2007-12-20T14:05:51-05:002070599http://forums.asp.net/p/1196646/2070599.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>This is one of the things I plan on committing to the mvc contrib project.</p> <p>My plan is to create an ajax interface mirroring whats available in Rails and then create library specific implementations.&nbsp; My library of choice is jquery, so that one will be first.</p> <p>&nbsp;If you would like to help, email me at jcteague @ gmail.com</p> 2007-12-20T14:08:20-05:002070673http://forums.asp.net/p/1196646/2070673.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>&#43;1 Jc</p> <p>As for loosing 3rd part controls I am nothing but happy.&nbsp; Bring on more open, more powerful libraries.&nbsp; The controls were really only needed to handle raising, bubbling, and posting back events in the old webform model.&nbsp; With straight request/response you don't need any of that complicated stuff anymore.</p> <p>&nbsp;</p> 2007-12-20T14:38:00-05:002070946http://forums.asp.net/p/1196646/2070946.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>Good idea! Count me especially for the wrappers around ExtJs. I've modified the ExtJsSharp source code&nbsp; (see extension forum at extjs) to produce a c# source with the Config properties and the Events from the ExtJs javascript. That could be a start...<br> </p> <p>Thanks</p> <p>Marco&nbsp;</p> 2007-12-20T16:58:44-05:002071569http://forums.asp.net/p/1196646/2071569.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>&nbsp;Hello,</p> <p>I think losing the WebForms functionality will have an effect. But I have 2 points on this:<br> </p> <ol> <li>WebForms controls still can be used in ASP.NET application together with MVC. </li><li>It is unlikely to be compatible with MVC. </li></ol> <p>Bad (which is actually good :-)) thing is developers should learn new things good thing is there's no ViewState&#43;full HTML control :)</p> <hr> <p>As for the js-libraries.</p> <p>I see people really love two ones: jQuery and ExtJs.<br> Important difference is their licensing:</p> <ul> <li>jQuery - <span class="sourceRowText">Dual licensed under the MIT </span><span class="sourceRowText">and GPL.</span><br> </li><li>ExtJs - LGPL or commercial. </li></ul> <p>So ExtJs seems to be more strict in terms of licensing.<br> I cannot understand if it is allowed by the LGPL to sell (distribute for installation on client machines) the web site that uses/modifies LGLP library? What are the restrictions in this area?</p> <p>The good thing is ExtJs can be used on top of jQuery (it has set of adapters). So both libraries can be used successfully together.&nbsp;</p> <hr> <p>I had have a look at projects like ExtJsSharp some time ago. Also there was one nice project on ExtJs that integrated Design-time support into Visual Studio. Not sure what its status is.<br> This is very interesting idea, but personally I prefer to write the JS by hand instead of generating by a framework. There are also some diadvantages, related to performance with this approach (script are always embedded into page, additional server load).<br> </p> <p>It's like companies tell &quot;you don't need to know HTML/JS/CSS, just use our tools&quot;. People like this and use their tools. At the end they should learn and write JS anyway :).</p> <p>Nothing against C# generated JavaScripts. Just my personal preference.<br> </p> <hr> <p>One more thing. Why then do we need ASP.NET Ajax? Can somebody give points why we need it in MVC apps?<br> I can see one: if MVC&nbsp; is used together with WebForms, then ASP.NET AJAX is a good choice because of server-side integration.&nbsp;</p> <hr> <p>So, what about some survey for the ASP.NET MVC community which javascript library to contribute to?<br> This would allow everybody to move in the same direction.</p> <p>What I'm trying to achieve:</p> <ol> <li>Choose set of most suitable JS libraries for ASP.NET MVC.</li><li>Choose which one is more suitable for most people.</li><li>Stick MVC to this library (like RoR to Prototype).</li></ol> <p>This would probably allow people to contribute into the same project and make it much better, than people would contribute into different ones.</p> <p><b>As for step 1 I propose to choose following libraries:</b></p> <ul> <li>ExtJs</li><li>jQuery</li><li>Prototype</li></ul> <p>As I said, the good thing about ExtJs is it can be used on top of both jQuery and Prototype. So having ExtJS, it will be easy to use one of these too.</p> <p><b>Then I (or anybody) can create survey on step 2 and post it here (if moderators will allow).<br> Start new contribution project (or existing MVCContrib) based on the results.</b></p> <p>So this way client-side library support will be under development based on people's opinion, not just by guessing.<br> It would be targeted.<br> </p> <p>Ok. Sorry for the long post :)<br> </p> 2007-12-20T23:20:52-05:002071593http://forums.asp.net/p/1196646/2071593.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>There is already some discussion going on in <a href="http://www.codeplex.com/MVCContrib/WorkItem/View.aspx?WorkItemId=586"> MVC Contrib</a> about this.&nbsp; Please feel free to make suggestions there, hopefully soon after the holiday some work on this will begin.<br> </p> 2007-12-20T23:51:24-05:002071687http://forums.asp.net/p/1196646/2071687.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>Thanks I see.</p> <p>The work item is saying on itself. It says &quot;<i><span id="ctl00_ctl00_Content_TabContentPanel_Content_TitlePanel"><span id="ctl00_ctl00_Content_TabContentPanel_Content_TitleLabel" class="CodePlexPageHeader">Support for prototype.js, script.aculo.us?</span></span></i>&quot;.<br> But lots (most?) devs <a href="http://dnagir.blogspot.com/2007/12/2007-ajax-tools-usage-survey.html" target="_blank"> want other</a> libraries to use.<br> </p> <p>So it sounds like a good idea to make it pluggable. But it's not very easy and even the MonoRail still hasn't come with a good solution.</p> <p>So I still think MVC should be sticked to one library. It's just impossible to make all of the client-side functionality generic.</p> <p>The question is which one.</p> <p>Regards,<br> Dmitriy. <br> </p> 2007-12-21T01:26:09-05:002072110http://forums.asp.net/p/1196646/2072110.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>So, why not the Microsoft Ajax libraries? <br> </p> 2007-12-21T07:58:29-05:002072141http://forums.asp.net/p/1196646/2072141.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> The work item is saying on itself. It says &quot;<i><span id="ctl00_ctl00_Content_TabContentPanel_Content_TitlePanel"><span id="ctl00_ctl00_Content_TabContentPanel_Content_TitleLabel" class="CodePlexPageHeader">Support for prototype.js, script.aculo.us?</span></span></i>&quot;.</blockquote> <p></p> <p>Now its support for client script.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> But it's not very easy and even the MonoRail still hasn't come with a good solution.</blockquote> &nbsp; <p></p> <p>I am not sure how much they tried, the original stuff was inspired by rails which was prototype.&nbsp; They have added a JSGenerator so you can implement your own JS capabilities, its just most of the helpers are already tied&nbsp; to the original prototype stuff.&nbsp; I also have heard hammett say that he was disappointed with how reliant on prototype they are after he started playing with some JQuery stuff.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> So I still think MVC should be sticked to one library. </blockquote> &nbsp; <p></p> <p>I couldn't disagree more, MS MVC in general is probably going to use AJAX.Net in some way.&nbsp; MVC Contrib is going to want to give people the option to use whatever library they want.&nbsp; Right now you can use Windsor, Spring, or StructureMap.&nbsp; Similiarly you should be able to use prototype, jquery, extjs, or whatever.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> It's just impossible to make all of the client-side functionality generic.</blockquote> &nbsp; <p></p> <p>I disagree, I think its important to think about the api and what functionality is required from helpers.&nbsp; Every library, ext, prototype, jquery, can all do pretty much the same stuff just a little differently.&nbsp; If we focus on giving developers helpers for the most common functionality it shouldn't be too difficult.&nbsp; Anything that isn't common you probably want to be writing custom JS for by hand anyway.&nbsp; We also have extension methods which MR does not.&nbsp; Doing custom stuff in a different namespace is also a possibility.</p> <p>My question is, what type of helpers are you thinking of that are so tied to a particular library. <br> </p> <p>&nbsp;</p> 2007-12-21T08:16:53-05:002072222http://forums.asp.net/p/1196646/2072222.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>Why not MS Ajax... Good question. I think it was originally designed to use with WebForms (even if it has lots other of capabilities).<br> Anyway, jQuery, Prototype, ExtJS are very mature ones and has lots of extnetions plug-ins etc. And they are open-source which brings more ability to it, more people contribute to it.</p> <p>But MS AJAX should probably be considered too.<br> &nbsp;</p> 2007-12-21T09:27:51-05:002072237http://forums.asp.net/p/1196646/2072237.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p></p> <blockquote><span class="icon-blockquote"></span> <h4>abombss</h4> MVC Contrib is going to want to give people the option to use whatever library they want</blockquote> <br> This is good idea, but there is always something &quot;by default&quot;. Everybody can write bunch of helpers, even separate projects for any client-side library. <p></p> <p>But it would be nice to decrease such a need providing a good &quot;default&quot;.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>abombss</h4> Every library, ext, prototype, jquery, can all do pretty much the same stuff just a little differently</blockquote> <br> Yes. But you also understand that they do it different ways. I don't believe it's possible to write GridHelper that would produce the grid with the same functionality for ExtJS, jQuery, Prototype.<br> <p></p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>abombss</h4> Anything that isn't common you probably want to be writing custom JS for by hand anyway.</blockquote> <br> Probably yes. But Helpers could just make it easier, like FormHelper does. <p></p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>abombss</h4> My question is, what type of helpers are you thinking of that are so tied to a particular library.</blockquote> <br> All is because of losing WebForms controls. So I think about having UI helpers that would allow doing things like these: <p></p> <ul> <li>Grids. Filtering, grouping, sorting, paging etc. Very good in ExtJS.</li><li>Inputs. Calendars, date picker, formated text, time picker, currency etc.</li><li>User interaction. Modal windows, tooltips, feedback messages, progress bars etc.</li><li>Validation.</li><li>Consistent style.</li><li>etc</li></ul> <p>Generally the idea is to &quot;replace&quot; existing suites as much as possible. ExtJS seems for me to be the closest one to large components suites, like <a href="http://www.telerik.com/demos/aspnet/Controls/Examples/Default/DefaultCS.aspx" target="_blank"> Telerik</a>'s.</p> <p>Maybe it is not about Helpers, but rather user controls...&nbsp;</p> <p>Regards,<br> Dmitriy.<br> </p> 2007-12-21T09:45:02-05:002072282http://forums.asp.net/p/1196646/2072282.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p>Another vote for ExtJS featuring in mvccontrib, Microsoft MVC tutorials and the like. I love its BasicForm and TextField&nbsp;components to allow easy client-side validation. I think these rich javascript libraries are easily a replacement for ASP.NET control libraries.</p> 2007-12-21T10:20:57-05:002073163http://forums.asp.net/p/1196646/2073163.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> Maybe it is not about Helpers, but rather user controls...&nbsp;</blockquote> &nbsp; <p></p> <p>I share this opinion.&nbsp; Helpers are helpers, not ServerControl replacements.</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nagir</h4> I don't believe it's possible to write GridHelper that would produce the grid with the same functionality for ExtJS, jQuery, Prototype.</blockquote> <p></p> <p>I hope to prove you wrong then... Although as noted above, I don't think a GridHelper is the correct use of a helper, but we will see. <br> </p> 2007-12-21T18:50:46-05:002074412http://forums.asp.net/p/1196646/2074412.aspx/1?Re+Helpers+for+client+side+librariesRe: Helpers for client-side libraries <p></p> <blockquote><span class="icon-blockquote"></span> <h4>abombss</h4> I share this opinion.&nbsp; Helpers are helpers, not ServerControl replacements.</blockquote> <br> Ok. It sounds logical. So let's assume that we want to create server controls to &quot;connect&quot; functionality of client-side libraries with the server part. <p></p> <p>What should be done for that and what are the plans in the MvcContrib about that?<br> I mean MVC is cool. But it's a really a bad thing to lose current WebForms controls.<br> </p> <p>Cheers,<br> Dmitriy. <br> </p> 2007-12-23T12:35:47-05:00