0% found this document useful (0 votes)
55 views

C Reate Data. R Ead Data. U Pdate Data. D Elete Data.: Cookbook Application

The document discusses differences between PHP and ASP.NET for web development. Key differences include frameworks, average development time, and cost. Frameworks vary more for PHP while ASP.NET MVC is considered better. Small projects have faster development in PHP but C# scales better. PHP has a lower cost for small to mid-sized projects. The technology should match the client's needs and preferences.

Uploaded by

Sri Harsha
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

C Reate Data. R Ead Data. U Pdate Data. D Elete Data.: Cookbook Application

The document discusses differences between PHP and ASP.NET for web development. Key differences include frameworks, average development time, and cost. Frameworks vary more for PHP while ASP.NET MVC is considered better. Small projects have faster development in PHP but C# scales better. PHP has a lower cost for small to mid-sized projects. The technology should match the client's needs and preferences.

Uploaded by

Sri Harsha
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Here is a good litmus test:

Can you build a cookbook application?

At its core, a cookbook application is a CRUD application. This means it includes web pages which:

C reate data. R ead data. U pdate data. D elete data.

To do this (without an out-of-the-box CMS of course ;), you must implement a fair amount of C#, SQL, XHTML, and CSS. This would be a good start. Once you can build a cookbook application, reflect a little bit more. Can you build an attractive cookbook application? That is, can you build an application which is both aesthetically pleasing and very usable? To do this, you must implement a fair amount of javascript and/or jQuery. If you can do this, then you are most certainly ready to interview for an entry-level ASP.NET position. And when preparing for the interview, be ready to discuss your experience putting together the "cookbook application".

I have worked extensively in developing web applications using PHP and ASP.NET, but one of the questions that I'm constantly asked by customers is whether to move forward with a php website or an asp.net website. So naturally the first thing that comes to mind is to answer the question like this: PHP is open-source and ASP.NET is from Microsoft. Usually after something like that is said the customer has a blank look on there face. Apparently the fact that one is open source and the other isn't doesn't really faze them. And for good reason, because when I first heard it, it really doesn't tell me much. I know from working with both that each have their + and - when it comes to developing websites. NOTE: THIS QUESTION IS NOT TO QUESTION WHICH IS BETTER TO DEVELOP WITH. THIS QUESTION IS INTENDED TO BE OBJECTIVE. My question is what are differences between ASP.NET and PHP as far as 11 down vote favorite 5 share [g+] share [fb] share [tw] 1. 2. 3. 4. 5. Features Security Extendability Frameworks Average Development Time

And when one is generally used over the other for certain types of projects. I am trying to compile a list of facts to be able to compare with the customer what developement platform is better for there particular project. I have done a simple search on google and a ton of articles come up, but the problem is the majority are usually biased towards PHP or ASP.NET. Also if you can maybe provide examples from experience when one technology was more preferable than the other that would be awesome. web-development php asp.net websites asked Apr 5 '11 at 19:51

link|improve this question loyalpenguin 621116

100% accept rate I've used both, I think Visual Studio and ASP.NET are much more robust. The IDE alone wins me over. Nick Apr 5 '11 at 20:30 PHP will always have a soft spot for me because it was my first web programming lanaguage... but after 2 years of ASP.NET C# there is simply no 2 way I could go back.... Visual Studio IDE is wonderful! Dal Apr 5 '11 at 22:17 Yes I wish php would have some sort of main IDE, but I guess that would kill the very spirit of PHP being open source. Definetly a factor to consider. loyalpenguin Apr 5 '11 at 23:35 3 1 6. Cost over the lifetime of the project? VirtuosiMedia Apr 6 '11 at 21:24 @VirtuosiMedia another important factor I didn't mention. loyalpenguin Apr 6 '11 at 22:01 feedback

4 Answers
active oldest votes Features, Security, and Extendability are going to be more or less the same. What can be done with PHP can be done with ASP.NET. Frameworks Again, when it comes to features of frameworks, it will be more or less the same. However, being more specific than the language itself, you'll want to consider:

up vote 16 down vote accepted

65416

What your developers are most comfortable with. Knowledge = efficiency. On a project-by-project basis, one framework in one language might be a better natural fit than a framework in another. Being more specific than the language itself means a framework cannot help but be well-suited to some tasks and less-well suited to others.

Average Development Time Your average development time for a very small project might be better with PHP since web hosts are so easy to find and dev machines so easy to set up. However, with anything bigger, as long as you have good devs, or are already set up for either, it will probably be a wash.

The main consideration you should make is what technology stack your client wants to be tied to going forward. Neither mixes well (easily) with

the other. They may have developers who are familiar with one or the other.

If your client likes the idea of being connected to Microsoft, then go with ASP.NET. Some clients will have more comfort regarding future support, upgrades, etc. with MS. If they like the idea of open source and Linux servers, go with PHP. This may interest some clients due to transferability of web hosts, free software, etc.

And lastly, if they don't care, then go with what you are most comfortable with. There's not much to it beyond that. answered Apr 5 '11 at 20:08 link|improve this answer NickC 12.2k23492 +1 for "The main consideration you should make is what technology 6 stack your client wants to be tied to going forward." System Down Apr 5 '11 at 20:57 branching off of security is there no resource to see how each platform has performed? loyalpenguin Apr 6 '11 at 0:34 @loyalpenguin - that is a question in and of itself. I'm not sure what you mean by "how each platform has performed", but if you are talking about platform security holes (which are almost always quickly 2 patched) that is the least of your worries. For the most part, each language is as "secure" as the developer who's writing the code. NickC Apr 6 '11 at 15:23 good point.Just one last question How would I get out of the question which is more secure then? loyalpenguin Apr 6 '11 at 15:31 @loyalpenguin when I say it is a different question, I kind of mean the question is "Are platform security issues a major cause for concern in web apps? If so, how do I analyze which has a better history among various platforms, such as PHP, ASP.NET, Java, Ruby on Rails, etc.?" To me, I'm not so sure that it actually is a large cause for concern. NickC Apr 6 '11 at 15:41 feedback Just to give a background on what I am basing my answers on, I have done PHP development professionally for 6+ years, I have been playing around with ASP.NET MVC for about the last 3-4 months, and I have been doing C# programming for about as long as PHP programming.

up vote 7 down vote

65700

For me this is more of a PHP vs C# argument than a PHP vs ASP.NET one. Feature/Extendability I think the ASP.NET wins out here and this is more because of the ability to use a language like C#. C# is a far better language than PHP with it come to OO support. I am also a person that prefers a statically typed language (even thought with C# 4.0, I believe that you can do dynamically typed variables). The only thing that PHP had over C# as far as a language feature was optional parameters but that is another thing that has been added in C# 4.0 (not sure how well it works as I have not tried it yet). Security I would probably say that it is a wash between the two. I think both of them having functionality in place to help with security but it is ultimately the job of the programmer to make sure their application is safe. Frameworks Well PHP seems to have a lot more mainstream frameworks (CakePHP, Codeigniter, Symfony, Zend Framework) and a lot of other smaller frameworks than ASP.NET. ASP.NET has 2 main frameworks from Microsoft, WebForms (an utter piece of crap) and ASP.NET MVC (the reason I started getting into ASP.NET development). While PHP has more frameworks, I find that ASP.NET MVC 3 framework is better than any of the PHP frameworks. Average Development Time I think that for smaller projects the development time is much better in PHP however as your project grows in size, C# scales better in this regard. Cost Some that should be brought up is cost. PHP hands down wins on this front. While you can run ASP.NET on Mono in Linux, it does come with its own problems. If you are doing a small to mid size project and/or cost is a factor, PHP wins. If you are doing a large scale project, I would choice ASP.NET w/ C# & ASP.NET MVC. answered Apr 6 '11 at 19:07 link|improve this answer ryanzec 552112

Web Forms does have benefits though. For example the thousands of 1 ready to use controls for rapidly building web apps has been a plus to selling my customer on a website. loyalpenguin Apr 7 '11 at 3:57 I agree with @ryanzec WebForms isn't crap and is as good as ASP.NET MVC from different perspective. I've used ASP.NET MVC framework since Preview 2 of the first version in a commercial environment. Also I've used WebForms for the past 7+ years. Furthermore you can't argue costs anymore for ASP.NET, Microsoft supplies free tools, now thats better than what PHP is offering. Also Microsoft is supplying a free version of SQL Compact and SQL Server. Third party hosting for .NET is comparable to Linux these days. Nickz Apr 8 '11 at 3:24 While I will agree that the cost of hosting ASP.NET has gotten better I can can still find cheaper VPS LAMP Hosting much easier than VPS Windows hosting. ryanzec Apr 8 '11 at 10:10 Also to the point about WebForm, saying it is crap may have been harsh, it is just not my cup of tea. It is true you can get things up faster however you once you try to do something outside what is provided to you from the components or once you what to heavily modify an existing component, it exponentially harder. Also the whole way the system works with the postbacks and stuff just seems clunky too me for web development. I prefer ASP.NET MVC as it gives me 100% controller of what is created and fit for web development a lot better in my opinion. ryanzec Apr 8 '11 at 10:37 feedback PHP vs ASP.NET is like comparing apples and oranges, there targeted for different solutions. PHP is a better suited framework for small scale, start-up solutions. PHP will run or Linux, windows without too many requirements. Microsoft ASP.NET is an industrial strength framework, which has everything you could ever imagine and more. ASP.NET is very feature rich environment out-of-the-box. Many will argue ASP.NET is expensive, which was the case a few years ago but not anymore. First the tools are free (express editions), the database 65461 up options are free (SQL Compact or SQL Server 2005 or above Express). vote 5 down vote Purchase Hosting is now very cheap, so the question isn't which is better but what suits your solution. Personally I prefer ASP.NET, but thats because I work in a corporate environment where flexibility and scalability is very important thus the solutions dictates the framework. One very important thing is what language are you best at? This should be the final factor in the decision. If your goal is convincing a client, then asp.net is a better option. Big company name's backing a language makes a client feel comfortable. In this

case the best options are (Microsoft) ASP.NET and (Oracle) Java JSP. EDIT: Feature rich - ASP.NET provides two alternatives to building a website WebForms and the MVC approach. Since its apart of the .NET framework you have to very powerful features e.g. WF (workflow), DLR (dynamic Language Runtime), Parallel Linq, Linq, routing, various forms of data state management: HTTPContext items, ViewState, Runtime Cache, page output cache, three different type of session implementation InProc, State and SQL Server. ASP.NET implement various forms of security e.g. Membership Provider and Role Provider. I don't want to bag PHP, but ASP.NET is in a different league. answered Apr 5 '11 at 23:31 link|improve this answer edited Apr 7 '11 at 3:16 Nickz 927411 I always heard that as an excuse, that "Microsoft = Expensive" which is 4 why I learned PHP first. But I have to agree that really isn't the case anymore. loyalpenguin Apr 5 '11 at 23:33 Yes the playing field is quite even now, it's hard to know which language to use these days. Nickz Apr 5 '11 at 23:39 What exactly does "industrial strength framework" mean? "Everything you could ever imagine and more"? "Very feature rich environment outof-the-box"? How is ASP.NET these things, in ways that PHP is not? Until you have explained that, this is just Microsoft advertising language. NickC Apr 6 '11 at 15:21 feedback Having worked extensively with both, you already know that the answers will be different depending on the problem and the client. In a very generic sense:

up vote 4 down vote

65420

PHP is great for projects that need to work on a budget. For example, you won't get hit with big database licensing fees. ASP.NET is great for projects that need the kind of support and developer culture that Microsoft provides.

If you are compiling a list of facts for your clients, base it on what you know. Your research, no matter how biased your findings, is fine for getting your bullet points. link|improve this answer answered Apr 5 '11 at 20:15

Fred Wilson 25326 It sort of irks me when .Net gets automatically associated with "big database licensing fees." You must of course know that .Net can interface with quite a variety of RDBMS's, free and not, and of course so can PHP, free and not (and it's not like Microsoft is the only popular RDBMS with big licensing fees). qes Apr 5 '11 at 21:29 Not to mention that the Express and Web versions of SQL Server have vastly more palatable licensing fees (free in the case of Express). qes Apr 5 '11 at 21:29 Sorry, not meant to irk. MS just seems to sell better as a full stack and I was assuming a bigger DB engine than Express. Fred Wilson Apr 5 '11 at 22:45 Not taken personally, I just seem to see the association made quite often. qes Apr 5 '11 at 22:56 @loyalpenguin: In my experience, it is rare to find a storage engine that isn't supported in .Net. I cannot comment on whether or not this is as true with PHP.

1 1

Understanding programming and self improvement sources about the real logic
I have been a junior C# developer for only 1 year now. I can develop the projects but I have a concern. I do not know the big picture or the real logic behind programming and that makes me feel incomplete. This is like knowing how to use a car but not knowing how it works. Can you suggest me books or sources, so that I can improve myself and my understanding and really know and have control over what I develop? Appreciate any help. Thanks a lot.

up vote 3 down vote favorite 2

62522

share [g+] share [fb] share [tw] c# web-development stci-career self-improvement link|improve this question edited Mar 27 '11 at 11:10 asked Mar 27 '11 at 9:47

apoorv020 Yagiz Ozturk 602310 1182 Please mention which technology you want to discover in details? like .net winforms or asp.net, php, or any other Waqas Raja Mar 27 '11 at 9:54 .NET technology Yagiz Ozturk Mar 27 '11 at 10:15 Do you have a degree in computers? If not you should look at questions on "subjects every CS graduate should know". There are several such question on this site. apoorv020 Mar 27 '11 at 11:06 feedback

migrated from stackoverflow.com Mar 27 '11 at 9:56


This question came from our site for professional and enthusiast programmers.

3 Answers
active oldest votes

Some suggestions:

up vote 3 down vote accepted

62523

Learn C (and other steps in How to Become a Hacker - Hacker ala good programmer, not malware author) Read and solve the problems in Programming Interviews Exposed Read and solve the problems in SICP Try solving some practice problems at http://www.topcoder.com/ Try solving some pratcice problems at http://projecteuler.net/ Read some advanced C# books, like those by Jeffrey Richter or Jon Skeet

Dig into code, and code at home for fun (on fun projects, like a ray tracer, and on small projects that exercise interesting/new .Net technologies, possibly for work) Also, just relax. Things will come in time, if you have passion and keep at

it. See Teach Yourself Programming in Ten Years


answered Mar 27 '11 at 9:57

link|improve this answer

Merlyn Morgan-Graham 60117 Thanks alot. I will do my best to keep it up with those. Yagiz Ozturk Mar 27 '11 at 10:14 1 @Yagiz: Remember to have a life too :) I program my worst when I spend all my time doing it. Merlyn Morgan-Graham Mar 27 '11 at 10:16 :) ok, i will keep that in mind Yagiz Ozturk Mar 27 '11 at 10:17 feedback

I think you should study a bit of computer architecture, not only programming. To program a computer, you have to know how it works. You may start with the Tanenbaum's book. After that, you can study compilation.
answered Mar 27 '11 at 10:23 up vote 1 down vote link|improve this answer
62524

Ubiquit 80129 Don't forget operating system concepts and Assembly (Assembly will learn you

to program at the machine level) Anto Mar 27 '11 at 12:13 The book I point goes from logical level (boolean arithmetic) to assembly language level. Hence, it explains the basics of both operating systems and Assembly programming. But yes, everything between the programming language used and the physical layer has to be known by the programmer. Ubiquit Mar 27 '11 at 12:16 feedback

I'd advice you to read something on software architecture and design patterns rather than computer architecture or solving algorithm puzzles. While you should certainly pay attention to those domains - that goes without question as a .NET developer you're pretty far from the physical layer, and skill at 62629 up solving algorithmic problems will surely make you a better programmer, but won't help you understand the architecture of the system or the design vote 1 down vote decisions it influences. As for concrete titles - "Design Patterns" and "Software Architecture In Practice", both published by Addison-Wesley, would be a good starting point.

Should I be a professional in C# programming in order to build good web applications using ASP.NET?
I do not know if there is special programming in C# for the web or it is the same?. If it is the same then what are the topics that I should focus on in C# in order to use it building web application by ASP.NET (Web forms or MVC). For example, if I want to build a website for one of the health centers, up will I need a lot of knowledge in C#? So,

62170

vote 8 down vote favorite 3

What are the topics that I should focus on in C# so I have enough confidence to build small - medium websites?

share [g+] share [fb] share [tw] web-development c# asp.net websites asp.net-mvc edited Mar 26 '11 at 6:45 asked Mar 26 '11 at 6:27 link|improve this question

Dan McGrath Goma 6,85362857 1

26% accept rate feedback

4 Answers
active oldest votes

C# is the language, and is the same for web development as for anything else. You'll need a strong foundation in the language for serious web work, including:

up vote 4 down vote accepted

62177

Expresions, types, variables, Operators, castiing Control Statements - loops, switch, if Namespaces Methods Exception handling Properties Enums Overloading Collections & arrays Using attributes Classes, objects, interfaces, inheritence, constructors, encapsulation, polymorphism A good understanding of events

You may not need in depth understanding of:


Reflection Generics Delegates Threading Linq Lambda expressions

However, C# itself will be the least of your worries. You'll also need:

Foundational HTML and CSS Basic OO principles Know-how about your data store: many people use SQL Server or some other RDBMS (so need SQL, ADO.Net as well as knowing how to set up the server). To know your way around the IDE To be able to set up solutions, projects, references, imports To be able to build, run and deploy your code Some javascript(?)

Then there is the asp.net stuff itself (I don't use MVC so can't comment on that area):

The event model Session / state management (viewstate, session state) Basic controls Configuring IIS Directives (<%...%>) Configuration How to structure the project answered Mar 26 '11 at 7:44

link|improve this answer

Kramii 5,69611738 Do you need ADO.Net or can you alternatively use Linq-to-SQL or Entities Framework for Database ORM? Also, is the 'event model' much different than the standard DOM event model (OnLoad, OnMouseDown, etc...)? Evan Plaice Mar 26 '11 at 9:52 @Evan: There are a lot of alternatives on the data storage front, so you're right you're not tied to ADO.Net. As for the event model, I was thinking of the serverside events that are raised by ASP.Net. These server side events are quite different from the events you mention, which occur in the user's browser. Knowing these events (when and why they fire & what to do about them) is one of the most important things that an ASP.Net programmer can learn. On the flip

side, you can get in a real mess if you don't know enough about them: that was my experience anyway. Kramii Mar 26 '11 at 22:07 @Kramil Cool, thanks for clearing that up. Now, I only wish I had an ASP.Net project to work on so I could fill in the gaps in my understanding :) Evan Plaice Mar 27 '11 at 8:30 need to remember this answer the next time someone says "but it's just a website; easy right!" On a side note don't forget performance (consequences) of various software architecture / design decisions. Ken Henderson Aug 30 '11 at 1:11 @Evan: generally speaking Linq-To-Sql, EF, and other ORMs are a layer on top of ADO.NET. Also MS originally developed the classic ASP.NET model (eventing specifically) so that it would be similar to the windows app model [trying to get app developers to move to the web]. This is separate from the events that happen at the client (browser) and require a post back to the server. If you want to take a deeper look a typical 'get my feet wet' application suggestion is to build your own blog. Ken Henderson Aug 30 '11 at 1:16 feedback

You will probably need more knowledge about SQL and other database related technology than anything specific about C# other than the fact that it is an object oriented language. The best way to do these things is to just build a small project and see what code idioms come up because each framework has it's own way of doing things. If you know how to program then learning C# won't be hard. The hard part will be learning how to structure your application with whatever framework C# provides for web applications and this is just a matter of working with the framework to get acquainted with its API.
answered Mar 26 '11 at 7:29

up vote 0 down vote

62175

edited Mar 26 '11 at 8:32 link|improve this answer

davidk01 2,058713

Can you explain why is it more important to know deeply SQL rather than C#, while most code will be written in C# and not every web application will need a database (or an SQL server)? MainMa Mar 26 '11 at 8:20 @MainMa: I didn't say deeply but enough to know how to work with the data in the database and some things about normalized and non-normalized table structures. I'm not sure what kind of web application doesn't need a database. Any non-trivial web application needs to persist information and the best way to do that is to store the data in a database. davidk01 Mar 26 '11 at 8:24 feedback

You can certainly use Linq to SQL or Entity Framework for your database work, but you will need to know about generic collections and LINQ to make effective use of them. I recently wrote a library project for a local school with a couple thousand books and a checkout/returns system using Entity Framework, code first, without having to write a line of SQL or doing any database design, but this is specific to the code first approach and it may be easier to go from a database-first approach to build your ORM from an existing database. Either way it's still necessary to know SQL for testing and so on. The event model in WebForms works basically like WinForms assuming you drag, drop and doubleclick your controls, although you'll have to pay attention to postbacks (via IsPostBack property), viewstate, session, etc. In 62206 up my opinion MVC will take considerably more skill in C# and understanding vote 0 down vote of more advanced concepts, in addition to the HTML, JavaScript and CSS you will have to work much more closely with.
answered Mar 26 '11 at 10:39

link|improve this answer

klir2m 1 feedback
62211

up recommend you get a good book by searching on amazon.com. A high rated

You can use either C# or VB.NET for ASP.NET Development. I would

vote 0 down vote

book will cover most of the topics needed to develop a small to medium website. Its not that difficult if you have some knowledge of programming. Infact I believe web development is a lot easier ( my case more interesting too ) than desktop development. Also I would like to add that ASP.NET uses the .NET Framework which comes in versions. I think the latest is .NET Framework 4. Just keep that in mind that when selecting a book and getting the tools.

You might also like