Results 1 to 6 of 6

Thread: I'm using ASP.NET with jquery and wondering what's my next step up.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2015
    Posts
    83

    I'm using ASP.NET with jquery and wondering what's my next step up.

    I've been developing small web apps on our company's intranet using asp.net and jquery for about 6 months. Since I'm coming from windows forms I sort of copied the flow of a windows app. All my events are handled by jquery and I have one view (windows form) per controller so it's very similar to a windows app. I pretty much phased out razor and models, it just seems harder to me. Also I'm using css grid for laying out my pages.

    Anyway I'm wondering where to go from here. I'm not sure I want to learn a framework like vue or react or angular, I'd rather learn a more generic technology vs a specific 3rd party platform. But I could be wrong. A couple things that sound promising are web apis and blazor, although I'm worried blazor is still a little too new.

    Any suggestions are appreciated! Some of the suggestions here helped me a lot when I chose asp.net mvc over windows forms.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: I'm using ASP.NET with jquery and wondering what's my next step up.

    Web API is basically MVC without the V. It's a way to create web services that work pretty much exactly like an MVC web site except that the controller actions return data instead of views. I'd probably suggest that you learn how to use MVC properly though. I may seem tempting to treat web development the same as Windows but that's a mistake. Originally, Microsoft created Web Forms in order to do just that and mimic Windows Forms. Now, Web Forms has been phased out in favour of MVC and Windows development has become more like the web, with WPF and UWP using XAML for the UI in a similar manner to an MVC view. That said, VS does have a project template for a single-page application (SPA) so you should probably use that if that's the type of application you want.

  3. #3
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,660

    Re: I'm using ASP.NET with jquery and wondering what's my next step up.

    Your currently doing MVC and your right choosing one of those other frameworks will be a significant departure, so as JMC said your choice is really to master MVC and properly understand the framework (and if you have not already moved to .Net Core then i would suggest that might be your next step), Or it is to choice one of those other frameworks.

    If your currently have all your database connection and calls in your website moving them out to a web service using WebAPI is not a bad thing to learn as also you can then learn about http calls and maybe making your app asynchronous.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2015
    Posts
    83

    Re: I'm using ASP.NET with jquery and wondering what's my next step up.

    Quote Originally Posted by NeedSomeAnswers View Post
    Your currently doing MVC and your right choosing one of those other frameworks will be a significant departure, so as JMC said your choice is really to master MVC and properly understand the framework (and if you have not already moved to .Net Core then i would suggest that might be your next step), Or it is to choice one of those other frameworks.

    If your currently have all your database connection and calls in your website moving them out to a web service using WebAPI is not a bad thing to learn as also you can then learn about http calls and maybe making your app asynchronous.
    Is Web API like a jquery ajax call?

    The problem I had with using MVC "correctly" was that it either couldn't do what I needed or it was slow. For example I have a table with about 2000 rows. If I passed in a model with a list of rows it took 1-2 minutes to load. With a jquery ajax call it literally took a couple seconds. And using that same example I had a drop down list that would repopulate that table if the user selected a different item in the list. I'm not sure how you'd do that in MVC.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: I'm using ASP.NET with jquery and wondering what's my next step up.

    Quote Originally Posted by madison320 View Post
    Is Web API like a jquery ajax call?
    No.
    Quote Originally Posted by madison320 View Post
    The problem I had with using MVC "correctly" was that it either couldn't do what I needed or it was slow. For example I have a table with about 2000 rows. If I passed in a model with a list of rows it took 1-2 minutes to load.
    That was you. There's nothing inherent in MVC that would cause that.
    Quote Originally Posted by madison320 View Post
    With a jquery ajax call it literally took a couple seconds. And using that same example I had a drop down list that would repopulate that table if the user selected a different item in the list. I'm not sure how you'd do that in MVC.
    It's not like MVC and jQuery/AJAX are mutually exclusive. You still use JavaScript to make things happen in the view and if you're using JavaScript then there's a good chance that you're using jQuery. As for AJAX, you can call controller actions asynchronously as well as synchronously.

  6. #6
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,660

    Re: I'm using ASP.NET with jquery and wondering what's my next step up.

    Is Web API like a jquery ajax call?
    Ah no Web API in the most simplest sense takes your database layer out of your project and puts it into its own web service, your create web methods which when called get data and pass it across HTTP(S) to your web site.

    You can use jquery ajax calls or MVC Http client calls to make calls for data from your web service.

    For example I have a table with about 2000 rows. If I passed in a model with a list of rows it took 1-2 minutes to load.
    That was you. There's nothing inherent in MVC that would cause that.
    Yeah that is not MVC that is causing your issue there, loading that amount of data into a list should never take 1-2 minutes so your likely doing it wrong.

    If you posted your code we could probably help you figure out what your doing wrong.

    With a jquery ajax call it literally took a couple seconds. And using that same example I had a drop down list that would repopulate that table if the user selected a different item in the list. I'm not sure how you'd do that in MVC.
    It's not like MVC and jQuery/AJAX are mutually exclusive
    All my MVC apps heavily use JavaScript as well, there are many times when you need to fire off a controller action based upon a page action like for instance a user selecting an item in a dropdown list, you do this via Javascript ajax calling your MVC controller method.

    How you reload your table or Grid really depends on if your using a third party component or if you are hand crafting one.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width