Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Jquery UI error
Message
 
À
12/04/2015 13:41:48
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618237
Message ID:
01618264
Vues:
60
J'aime (1)
Hi John,

Not trying to dissuade you, but... here are some thoughts I based on the discussion at this point.

If you're starting from scratch is there any reason you're starting with older technologies? If I were starting today I'd probably go the Bootstrap, AngularJs route rather than anything with jQuery UI. There are lots of issues with jQuery UI (no decent mobile support, clunky component api, very bulky for what you get) that make it a questionable choice for anything but specifically focused applications that fit its narrow use case (basically form centric desktop browser apps).

Also - given going forward in ASP.NET vNext that bundling will go away I would skip that whole ball of wax and go either with manually embedding scripts and links (and letting Web Essentials do minification) and or using a client side tool-chain using Grunt/gulp to handle the bundling/packaging tasks if even desired. Again - mainly because that stuff is going away in future versions of .NET and the focus goes to using the 'native' Javascript tooling.

Also - on a side note, it's not the best way to use NuGets for client side libraries. Most of the NuGet *client* packages tend to be out of date and again that's getting phased out for JavaScript libraries and content. In the future, the goal for NuGet is to *only* distribute .NET binaries plus possibly some configuration data. The rest is intended to be delivered via other tools like Bower (which is a client side component manager for JavaScript libraries).

FWIW, I've never been a fan by any of the pre-packaged templates that VIsual Studio provides. They are incredibly bloated and include tons of stuff that has to be ripped out usually and that end up complicating things you actually need to do. It's often much easier to start clean and follow the recommended setup of the actual client libraries and build from there rather than through the ASP.NET stock templates.

I realize this sounds overwhelming - heck it is, but I'd be very wary to go with jQuery UI for any production work at this point. Starting small and working with the original JavaScript libraries is the key IMHO and avoiding the cluster that ASP.NET's initial templates provide.

My 2 cents. Take with grain of salt of personal bias :-)

+++ Rick ---


>I am trying to create an html5, jquery, webapi application and can't even get by the first page, since all of this in brand new to me.
>
>I added the nugget package jquery ui and after install tried to use their accordion tool. I have verified via developer tools that to code.jquery.com are returning valid css and script. I coped most of the code from the jquery ui demo page.
>
>When run, I get the following error message on the call to: $("#accordion").accordion();
> Unhandled exception at line 99, column 21 in http://localhost:64779/Home/Index
> 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'accordion'
>
>
>Can anybody see what's wrong? Much appreciated.
>
>
>~html lang="en"~
>    ~head~
>        ~meta charset="utf-8"~
>        ~title~accordion demo~/title~
>        ~link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"~
>        ~script src="//code.jquery.com/jquery-2.1.3.js"~~/script~
>        ~script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"~~/script~
>    ~/head~
>    ~body~
>        ~div class="row"~
>            ~div id="accordion"~
>                ~h3~Section 1~/h3~
>                ~div~
>                    ~p~
>
>                        Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
>                        ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
>                        amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
>                        odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
>                    ~/p~
>                ~/div~
>
>                ~h3~Section 2~/h3~
>                ~div~
>                    ~p~
>                        Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
>                        purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
>                        velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
>                        suscipit faucibus urna.
>                    ~/p~
>                ~/div~
>                ~h3~Section 3~/h3~
>                ~div~
>                    ~p~
>                        Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
>                        Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
>                        ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
>                        lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
>                    ~/p~
>                    ~ul~
>                        ~li~List item one~/li~
>                        ~li~List item two~/li~
>                        ~li~List item three~/li~
>                    ~/ul~
>                ~/div~
>                ~h3~Section 4~/h3~
>                ~div~
>                    ~p~
>                        Cras dictum. Pellentesque habitant morbi tristique senectus et netus
>                        et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
>                        faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
>                        mauris vel est.
>                    ~/p~
>                    ~p~
>                        Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
>                        Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
>                        inceptos himenaeos.
>                    ~/p~
>                ~/div~
>            ~/div~
>
>            ~script~
>                $(function () {
>                    $("#accordion").accordion();
>                });
>
>            ~/script~
>        ~/div~
>    ~/body~
>~/html~
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform