新足迹

 找回密码
 注册

精华好帖回顾

· 澳洲生活Q&A-医疗 (2004-12-29) melguy · 墨尔本理发记 (2005-8-3) Eucalypt
· 新Membership有车一族 (2006-4-10) woodgreen · 学术讨论:STOCK VALUATION METHODS (2008-5-15) Devil_Star
Advertisement
Advertisement
查看: 1222|回复: 13

[IT] 各位高手,学习 asp.net MVC 有用么?? [复制链接]

头像被屏蔽

禁止发言

发表于 2010-6-4 10:52 |显示全部楼层
此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
有多大的市场份额??多大好处?? 谢谢各位
Advertisement
Advertisement

发表于 2010-6-4 10:58 |显示全部楼层
此文章由 Dan.and.Andy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Dan.and.Andy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
多大市场份额最好去问seek和mycareer.

评分

参与人数 1积分 +1 收起 理由
澳贼 + 1 有道理

查看全部评分

发表于 2010-6-4 11:10 |显示全部楼层
此文章由 orange0328 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 orange0328 所有!转贴必须注明作者、出处和本声明,并保持内容完整
学asp.net MVC 2吧,比较新的技术,应用的话也会相当广泛,对career的发展是好的。

评分

参与人数 1积分 +3 收起 理由
澳贼 + 3 谢谢

查看全部评分

头像被屏蔽

禁止发言

发表于 2010-6-4 11:16 |显示全部楼层

谢谢 orange0328

此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
asp.net MVC 最大的好处是啥? 速度快? 还是更正规?
头像被屏蔽

禁止发言

发表于 2010-6-4 11:16 |显示全部楼层
此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 Dan.and.Andy 于 2010-6-4 09:58 发表
多大市场份额最好去问seek和mycareer.


有道理
签名被屏蔽

发表于 2010-6-4 11:23 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
mvc现在在悉尼市场不大,digital agency绝大部分不会用(regarding learning curve & project成本-view手工render真的很painful,classic asp guys可能更喜欢一些),这基本上就rule out 60%-70%的职位。

公司自己的系统可能会用。

ms对mvc的市场定位是,mvc & webform会很长时间内并存,用那个取决于你自己project的nature,我个人见到的mvc的应用还主要是论坛,stackoverflow & msdn(t-sql)。

它好处就是对你自己的skill sets 和你自己的视野,mvc framework是open source的,你可以花上1-2个月自己分析一下,能提高不少。
Advertisement
Advertisement

发表于 2010-6-4 11:29 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 澳贼 于 2010-6-4 10:16 发表
asp.net MVC 最大的好处是啥? 速度快? 还是更正规?


好处:1。TDD (test driving development),从而让你有机会用其他third party test framework。
     2. fast, view都是你自己render,没有control的client_id.
     3. url seo friendly, (restful url)
     4. framework本身比较合理(mvc),尽管是steal from ruby on rails(nothing wrong)
     5. open source,你可以学到很多framework design的东西。
     
先想到这么多,其他人再补充把。

评分

参与人数 1积分 +4 收起 理由
澳贼 + 4 偶对你的景仰如滔滔滔滔滔滔滔滔滔滔滔滔滔 ...

查看全部评分

头像被屏蔽

禁止发言

发表于 2010-6-4 11:32 |显示全部楼层

楼上太牛了!!!!!!!

此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整

发表于 2010-6-4 11:47 |显示全部楼层
此文章由 orange0328 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 orange0328 所有!转贴必须注明作者、出处和本声明,并保持内容完整
我觉得主要好处是实现了各各层次的分离。MVC顾名思义嘛!带来的好处就是代码易于维护与管理还有扩展。而且也方便测试。
主要是一种理念吧,这样的代码对我个人来说看上去更舒服,更有逻辑感,以前所有东西都code behind没有条理。如果程序大了就很乱很麻烦了。
应用会越来越多的!我也在学习。
Hosanna
头像被屏蔽

禁止发言

发表于 2010-6-4 11:53 |显示全部楼层

既然楼上这么说了,我就开始学了

此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
谢谢啊
头像被屏蔽

禁止发言

发表于 2010-6-4 12:00 |显示全部楼层

希望对感兴趣了同志们有用

此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
ASP.NET MVC vs. ASP.NET Web Forms

As you have seen, in the previous section, and can probably imagine MVC is going to be an architectural pattern that is going to be around for the foreseeable future, especially on the web.  So it is very important to internalize and understand the major differences between ASP.NET MVC and the older ASP.NET Web Forms.
ASP.NET Web Forms

Starting with the .NET Framework Version 1.0, in January 2002, Web Forms was Microsoft’s first real attempt to provide a first class web application layer that was both robust and flexible enough to meet the demands of the web at that time.  ASP.NET Web Forms has proven to be a mature technology that runs small and large scale websites alike.  Web Forms, was built around the Windows Form construction, where you had a declarative syntax with an event driven model.  This allowed visual designers to take full advantage of the drag and drop, WYSIWYG, interface that they had become accustom to under Windows Forms development in Visual Studio 6.0.  In that they only needed to drop controls onto the ASP.NET page and then wire up the events, as was common in Visual Basic 6.0 development at the time. This made Web Forms a natural choice for Windows Forms developers, because the learning curve was low and the need to understand HTML and many of the web centric technologies almost zero.  Web Forms have many strengths and weaknesses:
Strengths

    * Mature technology
    * Provides very good RAD development capabilities
    * Great WYSIWYG designer support in Visual Studio
    * Easy state management
    * Rich control libraries from Microsoft and third party vendors
    * Abstracts the need to understand HTTP, HTML, CSS, and in some cases JavaScript
    * ViewState and PostBack model
    * A familiar feel to Windows Forms development

Web Forms has grown so much since 2002 because it has the ability to do great things that are often much harder to accomplish in other frameworks.
Weaknesses

    * Display logic coupled with code, through code-behind files
    * Harder to unit test application logic, because of the coupled code-behind files
    * ViewState and PostBack model
    * State management of controls leads to very large and often unnecessary page sizes

Web Forms is not all roses and buttercups, there are some serious setbacks that usually show up when you are trying to optimize your code for scalability, the biggest problems are the ViewState and PostBack model.  ViewState is a way to store the state of the controls, such as data, selections, etc, which is needed to preserve the Windows Form like development habits of the developers.  ViewState was necessary, because the web is a stateless environment meaning that when a request comes in to the server it has no recollection of the previous request.  So in order to give state to a stateless environment you need to communicate the previous state back to the server, in Web Forms this was accomplished using hidden <input /> fields that can become ridiculously large. This increased size becomes apparent when server controls such as GridView are added to the page.  PostBack was another creation to facilitate the Windows Form development feel, it renders JavaScript for every subscribed event, which leaves web developer less control over how the browser communicates with the server.
ASP.NET MVC

ASP.NET was often overlooked as a viable platform for modern highly interactive websites that required a very granular control over the output of the HTML, because of the lack of control over the rendered HTML.  This granularity of control was sacrificed in Web Forms to make if more like Windows Forms development, in other words easier for the drag and drop developers.  This lack of control over the HTML rendering forced developers to move the platforms such as PHP and Ruby on Rails, which offered the level of control they required and the MVC programming model that provided a necessary separation of concerns for their highly complex web applications.

This led Microsoft to announce in the Fall of 2007 that they were going to create a platform based off of the core of ASP.NET that would compete against these other popular MVC web centric platforms.  Microsoft implemented ASP.NET MVC to be a modern web development platform that gives a ‘closer to the metal’ experience to the developers that program with it, by providing full control and testability over the output that is returned to the browser.  This is the main and most important different between Web Forms and MVC, in my opinion.  MVC has many strengths and weaknesses
Strengths

    * Provides fine control over rendered HTML
    * Cleaner generation of HTML (well as clean as you keep it)
    * Clear separation of concerns
    * Provides application layer unit testing
    * Can support multiple view engines, such as Brail, NHaml, NVelocity, XSLT, etc.
    * Easy integration with JavaScript frameworks like jQuery or Yahoo UI frameworks
    * Ability to map URLs logically and dynamically, depending on your use
    * RESTful interfaces are used by default (this helps out with SEO)
    * No ViewState and PostBack model
    * Supports all the core ASP.NET features, such as authentication, caching, membership, etc.
    * Size of the pages generated typically much smaller because of the lack of the ViewState

Weaknesses

    * Not event driven by the framework, so it maybe more difficult for ASP.NET Web Form developers to understand
    * Requires the need to understand, at least at the basic level, HTTP, HTML, CSS, and JavaScript
    * Third party library support is not as strong
    * No direct upgrade path from Web Forms
    * No ViewState and PostBack model (makes it more difficult to preserve state)
http://www.coderjournal.com/2008 ... et-mvc-vs-webforms/

As you can see the pros and cons of MVC have to be weighed just as much as Web Forms, and MVC is not always the logical choice.
How do I choose?

It’s up to you to decide and you choice needs to be weighted with a number of other factors, such as team and application requirements, when deciding which ASP.NET technology to implement.  I have developed the following worksheet that will hopefully help you decide, when you need to make this decision.
签名被屏蔽
Advertisement
Advertisement

发表于 2010-6-4 12:01 |显示全部楼层
此文章由 orange0328 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 orange0328 所有!转贴必须注明作者、出处和本声明,并保持内容完整
我觉得如果有ASP.NET基础这个也不难。
我也还是在摸索中,呵呵,
给楼主推荐本书,我看过MVC,很不错,MVC2的这个月底release,应该是大同小异。

Pro ASP.NET MVC V2 Framework (Paperback)
http://www.amazon.com/Pro-ASP-NE ... 75613132&sr=8-3

我很看好这个MVC,之前Java里有用到类似的,感觉使用MVC结构很清晰,
Hosanna
头像被屏蔽

禁止发言

发表于 2010-6-4 13:17 |显示全部楼层
此文章由 澳贼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 澳贼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 orange0328 于 2010-6-4 11:01 发表
我觉得如果有ASP.NET基础这个也不难。
我也还是在摸索中,呵呵,
给楼主推荐本书,我看过MVC,很不错,MVC2的这个月底release,应该是大同小异。

Pro ASP.NET MVC V2 Framework (Paperback)
http://www.amazon ...

我就是昨天看了这本书,今天才问的。这书确实很不错!!
签名被屏蔽

发表于 2010-6-5 12:09 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 澳贼 于 2010-6-4 12:17 发表

我就是昨天看了这本书,今天才问的。这书确实很不错!!


嗯,不错,这本书是目前市面上mvc最好的一本,另外就是4个人头的那本。

open source的东西就是好啊,被人分析起来都这么透彻。

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部