As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
When is it better to have multiple views in something like MVC, as opposed to a single view via something like Prototype calling a Web API? It seems like in terms of UX, the single-page app with AJAX calls will always be better.
MVC is an architecture approach that separates the view from the model and connects the two via a controller. It is used to separate concerns that may have different audience and life-cycles. It applies to Web applications and other types of user-interface applications as well such as desktop, thick client and rich client apps.
As the comment says, a single page with a Java applet, Flash movie or Javascript/AJAX is not mutually exclusive with MVC. Your view is in the page, the model will most likely be on the server if you are using AJAX, although it may be within Javascript if the AJAX is purely for persistence to a 'dumb' data store.
So, you can have full MVC within a Javascript application and most frameworks are designed that way. Maybe your question was a comparison between web page to server controllers as compared to controllers in Javascript within the page?
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to develop a personal blogging website using ASP.NET MVC 4.
I know that I could be using WordPress/ Joomla/ Orchard/ Umbraco/ Funnelweb, etc., instead of reinventing the wheel but I really wish to try it out myself.
I do not want my website to look like some beatle-aged archaic remain. I see plugins like Akismet/ Prettify/ Markdown/ nrelate that add amazing functionalities to your blog. But I am not really sure if I would be able to use any of these in my custom application as most of them are PHP based. I want to stick under the Microsoft roof and implement technologies like HTML5, CSS3 Silverlight5 and WCF 4.0, along with ASP.NET MVC 4. (At least thats what I plan to do)
I understand that I need to develop a scalable database design that could accomodate newer functionalities in the future. Additionally, the exorbitant focus on SEO and cross-browser capabilities is overwhelming. Permanent links for individual blogs, internal navigation, video-embedding inside posts, etc., sound like building Rome in a day
Please if you could guide me personally or direct me to appropriate resources, it would be very helpful.
I am sort of doing it right now on my own. It's not done yet but it will give you an idea: MvcBloggy.
Also, have a look at FunnelWeb source code. It's written in C# and uses ASP.NET MVC 3 I believe but it's a really good resource and easy to follow.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So I want to start working on specific pages on my website to have a mobile version. I was wondering how I should go about it? Do I create a new controller for each controller so that if it detects mobile then it redirects to that controller? or do i just use css to change how the page gets viewed?
If I need to create a new controlelr do I host it on a subdomain?
Comments are greatly appreciated.
Thanks!!
#TheRealKingK is right about picking up some books on the matter. There are always 1000 ways to solve a problem, so it really depends on the variables involved in your project. I read an article in the latest MSDN that touches on mobile/desktop strategies and it had some good insight.
CSS media queries are excellent for helping render things for different sized screen, but do not help with detecting hardware capabilities, or filtering out heavy media out of the site for faster downloads on say a 3G mobile network.
Having a seperate controller base could be a decent strategy. I would have ALL your controller inherit from a custom base controller that (among other things), would determine where the request is coming from, and route them to the right controller. This really depending on what the site is for and what your client needs on the desktop versus a mobile app (native or HTML5)
I am playing around with rolling an MVC4 blogging application with a custom content management on the backend. Thus far it is pretty lightweight, so CSS is working for me.
I dunno if this sounds like a nerd-rambling or not, but hopefully it gives you some insight.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am building a web application that have several requirements for the client:
1. It should be one page (web app).
2. Contains complex UI elements (that I need to draw/create).
3. Support client side coding (data comes from 3rd parties and needs to be rendered in the browser.
I was leaning toward Vaadin but I'm not sure it is flexible enough for #3.
I don't care too much about the server side, I have a Tomcat server with servlets that provides all the data needed to be rendered (besides the data taken from other server).
I do care about the client side, but have zero knowledge in JavaScript.
My last web client was a complex Flash application, and Vaadin simply seems the "closest" way.
To conclude Given this info should I go with a Vaadin (or Wicket) solution?
Or invest time to really learn HTML5/JavaScript/CSS and build my UI in a conventional way?
(with possible help from Backbone/Ember/jQuery and/or any other)
Thanks
I think you should get started in HTML, CSS and JavaScript. The skills are very transferable and it is easy to get started (although there is lots of depth in these areas, so you'll never stop finding new things).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have achieved a beginner skills in mvc3 and now want to try next level.
I want to create a super simple CMS that has following features:
Support extensible skinning, i.e. start with some default dynamic skin and when change database setting for skin name, it should work with the new skin / theme
Dynamic pages loaded from database
partial view I think that can show available pages from database
Can somebody point me on how to get started? I tried to look into source code of orchard, and couple of other popular cms in mvc3 but because of lots of code, I am not just getting it properly to get started with.
Thanks in advance.
Don't worry about what other people are doing at the moment..
If this is just a learning exercise then you should look at what you want to do and then look at how to achieve that...
So your reqs are:
Extensible skinning (like themes in say WP?)
Dynamic pages
An admin area to manage pages
I guess the first thing is to get your areas setup if you want to do it that way.. (add an area for the admin section).
see here -> http://msdn.microsoft.com/en-us/library/ee671793.aspx
or
here -> http://mvccoderouting.codeplex.com/ -> this way could mean no need to set up areas... more detail on the page.
For the dynamic pages you are probably going to do something with routing a default controller.
do you reference the pages by id in the url... or do you have a key that makes up part of the url? that's one design choice you will have to make.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
A colleague of mine ran a simple load test using VS2010 on a Webforms project and an Asp.net MVC project and noticed that Webforms was serving around 83 requests per second whereas Asp.net MVC was serving 28 requests per second. Both the sites were published on the same server with similar settings.
Webforms project had 10 pages 5 of them displayed simple text messages using labels and the other 5 had text box controls. Similar functionality was built into the Asp.net MVC site so that the output is the same as the Webforms pages. Tests were run with both constant load and incremental load with similar results.
I am a little surprised with the results. Does anyone know why MVC is slower that Webforms?
Thanks!
Hmm. Without much info to go on, perhaps you should instrument your code to see what's taking a while and/or the difference between Web Forms and MVC.
You might use some aspect oriented programming techniques to remove the burden of all those logging commands.
Here's one such framework:
http://code.google.com/p/postsharp-user-plugins/wiki/Log4PostSharp