学习Web开发时应该使用框架吗 [英] Should I Use a Framework While Learning Web Development

查看:123
本文介绍了学习Web开发时应该使用框架吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到这可能是主观的,但是我确实需要一个答案,在论坛的其余部分中似乎找不到足够接近的答案.我读过一些人说该框架(任何MVC框架)可以掩盖太多事情,而其他人则说它可以促进良好实践.我意识到框架对于一定程度的程序员来说非常有用,但是个人入门呢?应该只专注于语言还是一起学习?

I realize that this may be subjective but I truly need an answer to this and I can't seem to find anything close enough to it in the rest of the Forum. I have read some folks say that the framework (any MVC framework) can obscure too many things while others say that it can promote good practices. I realize that frameworks are great for a certain level of programmer but what about individuals starting out? Should one just focus on the language or learn them together?

推荐答案

我认为Web开发比任何人刚开始学习时都要掌握的方式更多!阅读此书并知道它是所有可选的...但是要真正擅长于您的工作.

I think web development is way more than anyone grasps when they first start getting into it! Read this and know that it is all optional...but required to be really good at what you do.

我建议您先花时间学习语言.我建议学习C#仅仅是因为它的市场销售能力强得多,并且大多数MS产品通常都直接支持它.通过学习C#-在ASP.NET中进行编程,控制台应用程序,服务器,服务,桌面应用程序等都将触手可及.您可以为大多数MS产品以及许多Linux类型的平台编程.

I suggest that you spend time learning your language first. I would suggest learning C# simply because it is vastly more marketable and it is usually directly supported in most of MS products. By learning C# - programming in ASP.NET, console apps, servers, services, desktop apps, etc. will all be within your reach. You can program for most of the MS products as well as on many Linux type platforms.

一旦遇到问题,您就可以转向网络编程,因为网络编程具有大多数其他环境所没有的复杂性.诸如会话,缓存,状态管理,跨站点脚本,样式,客户端与服务器端编程,浏览器支持,HTTP如何工作,获取与发布,表单如何工作,Cookie等概念都位于顶部.单独学习的东西列表,更不用说学习ASP.NET基本框架和名称空间了.

Once you have this down then you can move to programming for the web as programming for the web has some intricacies that most other environments don't have. Concepts such as sessions, caching, state management, cross site scripting, styling, client side vs server side programming, browser support, how HTTP works, get vs post, how a form works, cookies, etc. are all at the top of the list of things to learn separately not to mention learning the ASP.NET base frameworks and namespaces.

一旦您掌握了编程语言,然后掌握了Web编程的概念,我建议您暂停学习数据库设计.暂时不必担心性能...尝试先学习好的设计.性能将是下一个. Access对您来说是个不错的开始(我知道这是亵渎).对于初学者来说,工作很容易.而且它可以轻松地转换为更强大的平台,例如SQL Server.至少学习一些SQL ...但是我建议您学习尽可能多的胃.我听说有人说SQL就像数据库的汇编语言.使应用程序停止运行的第一件事是糟糕的数据库设计和糟糕的查询.一旦掌握了这些知识,就把它塞在脑海中,看看一个好的ORM. NHybernate目前可能是最好的,但是它是基础学习者需要的更复杂的东西.因此,我目前建议启动LINQ to SQL并使其运行起来非常方便.然后看一下Entity Framework(尽管我仍然认为它很烂...而且您应该等到EF 2.0 ... ERRRRR ...现在与.net 4.0一起发布4.0).然后是NHybernate.

Once you have the programming language down and then the concepts of web programming I suggest that you pause and learn database design. Don't worry about performance just yet...try to first learn good design. Performance will come next. A good start for you is Access (blasphemy I know). It is easy for a beginner to work with. And it translates into a more robust platform such as SQL Server easily. Learn at the very least some SQL...but I suggest that you learn as much as your stomach can handle. I heard someone say that SQL is like the assembly language of the database. The number one thing that slows an application to a halt is piss poor database design and poor queries. Once you have this knowledge - stuff it away in the back of your mind and take a look at a good ORM. NHybernate is probably best at the moment but is more complex that the basic learner needs. For that reason I currently suggest getting LINQ to SQL up and running as it is SUPER EASY to work with. Then look at Entity Framework (although I still think it sucks...and you should wait till EF 2.0...ERRRRR...now 4.0 released with .net 4.0). Then NHybernate.

现在是时候开始了解Web开发所需的基础结构了.在学习一些Web编程知识时,您可能会对此表示怀疑.但是您需要了解DNS,IIS,负载平衡器,粘性路由,轮询,群集,容错,服务器硬件设置,Web服务器场,缓存服务器场(MemCached Win32,Velocity),SMTP,MSMQ,数据库邮件队列,等等.许多人可能会说您不需要这个.将会有一些知识渊博的网络管理员在这里为您提供帮助.但是,他们通常知道会影响他们的事情……不是您.您在这里了解的越多,您对雇用您的公司的价值就越高.

Now is the time to start to understand the infrastructure that is required by web development. You may bump your head against this as you learn some of the web programming stuff. But you need to understand the basics of DNS, IIS, load balancers, sticky routing, round robin, clustering, fault tolerance, server hardware setup, web farms, cache farms (MemCached Win32, Velocity), SMTP, MSMQ, database mail queuing, etc. Many people may say you don't need this. That there will be some knowledgeable network admin to help you out here. However they generally know things that impact them...not you. The more you know here the more valuable you will be to the company that hires you.

现在,您可以了解最佳做法和设计模式的详细信息.了解诸如存储库模式,工厂模式,立面模式,模型视图演示者模式,模型视图控制器模式,观察者模式以及各种其他内容的基础知识.在这里关注Martin Fowler和其他人的建议.看一下诸如控制反转,依赖注入,SOLID原理,DRY,FIT,测试驱动的设计和域驱动的设计等概念.在进行下一步之前,请您在这里学到很多.

Now you can get into the details of best practices and design patterns. Learn about the basics such as repository pattern, factory pattern, facade pattern, model view presenter pattern, model view controller pattern, observer pattern, and various other things. Follow Martin Fowler and others for suggestions here. Take a look at concepts such as inversion of control, dependency injection, SOLID principle, DRY, FIT, test driven design, and domain driven design, etc. Learn as much as you can here before moving to the next step.

现在您可以考虑框架!首先使用ASP Classic创建一个基本应用程序(IIS免费提供!).这将为您提供简洁的Web开发环境.简要介绍一下ASP.NET Web表单,以了解MS如何通过隐藏所有复杂的东西(现在您可以通过阅读上述材料而知道如何自行管理!)来使事情变得更容易!现在,您不再需要ASP.NET Web窗体.立即移至ASP.NET MVC. MVC框架为您提供了创建良好的易于管理的Web应用程序所需的全部功能.如果您构建了非常大的东西,那么纯Web开发的框架可能无法满足您的需求.但是,对于这样的UBER自定义方案,MVC的可扩展性更高.

NOW you can think about frameworks! Start by creating a basic application with ASP Classic (comes with IIS for free!). This will give you a flavor of a no frills web development environment. Take a look at ASP.NET web forms (briefly) to see how MS attempted to make things easier by hiding all the complex stuff (which you now know how to manage on your own from your readings of the above materials!!!). Now you no longer need ASP.NET Web Forms. Move immediately to ASP.NET MVC. The MVC framwork gives you all the power you need to create a good easily manageable web application. If you build something really big no framework for pure web development may be able to deal with what you need. However MVC is way more extensible for such UBER custom scenarios.

现在,您已经完成了ASP.NET MVC的旅程,现在您可以看一下诸如Microsofts Enterprise Application Blocks之类的东西(例如它们在MySpace上使用的东西).看看 Elmah 错误记录(必须具有).查看如何构建用于您的MVC网站的自定义SiteMapProvider .如果您需要搜索内容,请理解 Lucene.NET .

Now that you have made it through the journey to ASP.NET MVC you can take a look at things such as Microsofts Enterprise Application Blocks (such as they use at MySpace). Take a look at Elmah error logging (a must have). Look at how to build a custom SiteMapProvider for your MVC site. If you need to get into searching stuff understand Lucene.NET.

如果到目前为止,您已经准备好了自己解决剩下的一切! 玩得开心.在这个空间中,对于那些对上述所有概念都有一定了解的人来说,都有很大的空间.

And if you made it this far...you are ready to figure out the rest on your own as it comes up! Have fun. There is a lot of room in this space for a person with some understanding of all of the above concepts.

这篇关于学习Web开发时应该使用框架吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆