C# / Web Development learning strategy [closed] - c#

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
For a newcomer to .NET Web Development and programming in general, who chooses C# as there preferred language?
Is it better to learn C# first, without trying to apply it to web development? It seems most literature for C# uses Console or Windows Forms as a learning platform. So would that be the best direction?
Or should you practice in web development and try to learn C# alongside?

You need to understand the fundamentals of C# in order to develop anything useful, be it an ASP.NET website, windows client or web service.
I would start with some good tutorials around the basics of types, classes, methods, events and so on to get to grips with C#. C# Station has some good introductory tutorials here.
To develop web specific skills, start with HTML and CSS.
Then look at how the ASP.NET platform integrates both the C# (application code) and the HTML and CSS (presentational code).
And good luck!

I've helped several people go both from previous languages (like C++) as well as no experience to using C#.
Definately learn C# before you try any particular kind of development (like Web stuff). It will only confuse the newcomer.
If you already know a language, reimplementing a small application from the old language to the new language can help a lot.
Also there are often books for common language transitions - the C# for C++ developers books are good examples. I recommend reading them.
Here's my teaching plan (in short summary):
Give an overview of C# language (types, methods, Main()
Have students write Hello World from the console.
Have students implement the "Simon Says" game from the console.
Have students implement "Simon Says" in WPF. (Using the designer. This used to be Windows Forms, but WPF is a cleaner model)
Give a survey of the more advanced features in C# - delegates, events, etc.
Have students implement "Simon Says" in ASP.NET.

I disagree about learning C# in a bubble. If your end goal is to do web development why start with developing anything but?
The one exception is the console. It's incredibly easy to learn if, for, foreach, etc. in the console.
Do you have any programming experience, web or otherwise? If the answer is no, I'd learn XHTML and CSS first. There are a million tutorials online and it is pretty easy.
If you already have web programming experience then learning C# and applying to the web shouldn't be very difficult. Make sure you read the basics of the two types of ASP.NET (WebForms and MVC) and pick which makes more sense to you. Go thru the tutorials on the asp.net and you should have a fairly good start.
That's how I did it anyway.

My suggestion would be to do both as if you are doing only web development, then console or Windows applications may not be meaningful to complete. Another point is that there may be parts of C# that are specific to Webforms such as AJAX functionality to name one example though the ASP.Net MVC may be another worth looking at to some extent.
I would start with the simple, "Hello World!" example(Which can be done in a few ways in the web case and it is worth knowing all of them, e.g. straight HTML that doesn't have anything fancy, a Response.Write in the .aspx file, a Response.Write in the code behind, and using the "<%=" and "%>" tags for the last form) and then expand on that by using storage in files or databases and work towards building up various skills around a core of seeing C# used within web stuff.

Related

Modular Website Design, with ASP.NET MVC, I want a less-monolithic design [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to build websites in a modular fashion, so I can get better code reuse and abstract away some implementation details. I'm looking for advice on how to code such a website with ASP.NET and Visual Studio, and modules for such a website, because at the moment my websites don't have this nice property.
At the moment I'm working on a web-app that's providing a pretty straight-forward internally facing contact manager for a company. We plan on using identical contact managers (pointing to different databases) for each of our independent customer-facing websites (each for one of the company's businesses). I'm using ASP.NET MVC in C# with EntityFramework. What I'd like, is to be able to simply drop this contact manager package/project/class-library into a Visual Studio solution for an ASP.NET MVC Website, and then just add whatever 'wiring' I need to get them working together. I've seen the use of "areas" within MVC apps, that basically function as mini MVC applications, but it's been messy and actually less maintainable because of configs and different areas wanting different versions of assemblies (this is not code I wrote, and I want to avoid writing code like this). I have an idea of what this would look like in terms of data-objects and box&line diagrams; unfortunately, I don't know what this looks like in terms of views, controllers, projects, or assemblies.
The thing is, as a relatively unseasoned programmer, I've never done this before, so need advice on how to proceed. I'm unfamiliar with the patterns/idioms I need to implement this. So while I have the theoretical knowledge of how to write nice modular software architectures, I don't know they end up looking like in-terms of their actual classes, namespaces, and Visual Studio Projects/Solutions.
My question is, how do I build a website that's more modular than your standard MVC? And, if you have experience doing this (or attempting to), could you please share it? Or even better, can you offer a concrete example of such an architecture? (note this will probably require a link to something not on stack overflow, since you can't copy and paste an entire code-base to stackoverflow).
Apologies for not having a specific question, but this is a bit more complicated than a simple query of "how to traverse a b-tree", "why isn't my code compiling", "does anyone have a regex to do the thing I want", "I wrote some terrible code and now it broke", and "I haven't read the documentation (assuming there is any) and now I'm getting an exception that I don't understand". There likely isn't a single answer, because programming is complicated, solving real-world problems takes thought, and writing good code can be hard. Also, I can't exactly post the code I'm working with because of this thing in my contract known as a confidentiality clause, and not that anyone would read through 100's of thousands of lines of code and tell me how to make it better. \end_rant
I think you are looking for the "Onion Architecture".
Here's a live implementation of the Onion Architecture over on GitHub that uses Web API, MVC etc. It uses the all familiar Northwind database. So you can browse through the code and solution after you learn about this architecture and make sense of it and incorporate the parts you need in your project / solution.
Also, here's a nice tutorial on how to develop using this approach.
Finally, a Channel 9 Video that was what I originally found a few years back when I was researching the same thing, and found it very useful.
ASP.NET MVC Solution Best Practices
This video also takes an existing monolithic project and turns it into an Onion Architecture implementation, along with reasoning on why we are doing what at every step.
First of all you have to direct yourself in implementing your systems based on an approach that can provide complex systems that will not make everyone furious in waiting.
This is commonly known as the Domain-Driven design.
Then comes SOLID. SOLID represents architectural choices that will make your system easy to maintain and extend.
See SOLID in action using C#
All these along with Patterns of Enterprise Application Architecture can keep you busy for all your career and yet it could not be enough.
trying to follow the above in your programming will give you eventually a "less-monolithic" system and modular.
In ASP.NET MVC terms the above could mean:
Keep the MVC paradigm. Do not feed your controllers more than they should eat. Keep them only for what they are. Traffic cops. Also do not put logic in your views in order to keep them abstracted.
Maintain your logic in a separate "space". By the word "space" i mean a separate project, solution, assembly....whatever you think fits to your application size that you are building.
Use MVC Areas for what they are supposed to be. They fit perfectly for the FrontEnd / Admin case. You want to have a frontend that looks and operates differently from the backend, but obeys some general system rules.
Use Web API to make your application open and expendable. This will bring Javascript into play which itself needs to be addressed regarding SOLID e.t.c..
Do not overdose your application with javascript frameworks just for the shake of it. Use what you really need.
Use IoC container like Ninject to manage your dependencies..Marry your interfaces and let IoC resolve your implementations
If you going deep in javascript , take your time to define your viewmodels correctly. They are the contracts between 2 different worlds so they must be clear.

Upload a .net application online? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm about to do a project on financial data visualization. Nothing advanced really, just some user input manipulated and visualized as an output with some charts and numbers. The thing is though, that even though the plan is to have it as a .NET desktop application to begin with an idea is to later transform it into a web based application. And since I've got no experience with that whatsoever my question is simply: Can one write a desktop application in C# .NET and later "upload" or "convert" it into a web based interface without too much work?
I've heard of ASP.NET that seems to be a pretty well used framework for web applications, but I cannot find anything about converting a desktop application into ASP.NET application.
Thanks in advance!
IF you divide your application into parts as you should - e.g. business logic, data access layer etc (into different dlls preferably), then all you need to do is just create a new UI, which isn't as bad as creating the app from scratch...
There is obviously a confusion in definitions. You (and it seems some of the guys that posted their answers here) have probably misunderstood the technology.
You can't compare ASP.NET to C#, because one is a web framework, the other is a programming language. ASP.NET can and does use C# (or VB.NET or other .NET language). ASP.NET can then be divided to MVC and Webforms. If you want to compare it to something, you should compare it to windows frameworks like WPF and Winforms.
That said, if the two apps have the same functionality, the logic and the C# stays basically the same. The only thing that changes is the framework that's used for the UI. That's why I'm talking about dividing the app into subprojects, which you can then reuse as needed.
As far as I got your question, there is no way to convert a .Net Desktop Application to a web application. you will need to re-write it. sorry buddy.
Unfortunately not.
When you start developing your Application for Desktop (for example with Windows Forms) the differences to a Web Application are too big too automatically convert.
I suggest to make a web Application from the beginning.
MfG Mike
I think there are service/companies/utilities that do do that, but you don't hear a lot about them, prob because they are not great. I don't know of other technology families that do that better either.
If the eventual goal is a website, prob just start with the website and forget the desktop. Slower to develop and more to be aware about to be secure are the other downsides.
the downvotes are prob about the question already being asked. If you google "stackoverflow: C# desktop to website conversion", here are three posts that are similar, in descending order of informativeness.
Converting ASP.NET Web Forms application into Desktop Application
Can I convert from C# to asp.Net to host application online?
How to Convert C# Desktop Application Project to website

Best/quickest way to learn Java for a seasoned .NET/C# and C++ developer [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What is the quickest/easiest way to learn Java for a seasoned .NET/C# (more than 7 years) and C++ (5years) developer.
When I say to learn Java - I mean being able to write applications in a "Java way" using base classes library + where needed using a popular Java libraries (it is great that so many of them are open source).
I know that Java development comes in a lot of flavors - enterprise applicatons (Java EE), mobile devices (Java ME), objects hosted in application servers (to my knowledge Java has a buch of these) - however at the moment I am interested in a general Java development - may be with a some emphasis on a integration projects/enterprise development.
So basically - I am a strong, passionate about technology, proud to be a senior C#/C++ developer with a dozen years of experience who wants to dedicate a month-worth (may be more) of evenings to learn to effectively program in Java environment.
Having said that I don't mean I am switching from .NET/C++ to Java - but I would probably have to spend 30%-50% of my development time developing/supporting/whateverstageintheSDLC in Java.
Thank you.
I suggest starting with The Java Language Specification. I don't think there is any quicker or more comprehensive way of gaining an understanding of the language for a seasoned programmer.
Followed by Java Collections Tutorial.
Followed by java.lang.* and java.util.* classes, interfaces and packages.
This will give a good basis for learning and understanding any other branch of Java as it becomes necessary.
I would take a completely different approach to reading books upfront. Simply download an IDE and get coding. The netbeans tutorials tend to get you up and running with a variety to technologies very quickly.
If you can code C# then you should have no problem getting something up and running.
Once you have some code up and running that is when you would then dig out the likes of effective Java.
Karl
Effective Java should be in every Java developer's bookshelf. It focuses not so much on performance as one might think from the title, but rather on how to program Java idiomatically, which becomes subtly different from following the idioms of C#.
Perhaps one of the best ways would be to get a copy of Bruce Eckel's Thinking in Java.
Much more than simply covering the syntax of the language, this book goes into the background - as the title says, "How to think in Java" so you can write pure Java code, not C# (or C++) code using Java Syntax.
I m only speaking for java web app development: i think its going to be quite similar to how you might've done it in C# using ASP.NET, except you don't get the visual drag and drop GUI creation using visual studio. The basic concepts are pretty much the same.
As for libraries, there are a million and one in java, and only time will help with those. But it'll help knowing the common ones, such as apache commons, google collections, spring, hibernate. It might help you get started if you start with something like Appfuse, which is a full java RAD web app framework that munges together all the above common frameworks.
On the build tools side, there are ant and maven as the major players. I prefer ant over maven personally.
Ordered list:
Thinking in Java;
Core Java, Volume II;
Spring reference;

In what order do I increase my ASP.NET Knowledge? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have some experience in ASP.Net and can work my way around it without much trouble, however there are a lot of gaps in my knowledge of asp.net and .net in general.
I know the basics of c# and asp.net so I can accomplish most things. But I don't know anything at all about LINQ, Entity Framework, ADO.NET, delegates, ASP.NET Ajax, ASP.NET MVC, Providers, the different api's provided with asp.net (such as membership), the default controls that come with asp.net as well as the normal patterns used to create rich, stable and high performance asp.net sites. The list goes on and on....
I have really been wanting to upgrade my skills now and become a well rounded .net developer before I get left too far behind in the curve. I also have been meaning to look into ASP.NET MVC partially because I`d like to extend an open source project.
The problem is every time I get down to learning I get too overwhelmed. I dont know where to start, whats relevant, whats not. I basically need to figure out in what order should I be approaching all these different things and tackling them?
Should I get down with one of those monstrous asp.net 3.5 books (such as asp.net unleashed...1500pages) and read it from start to finish? And then pick up some book on ASP.NET MVC? Do I need to actually read such books from start to finish or are there topics I can safely skip?
Sorry if the question is badly worded but I think my problem should be evident. I feel .net is evolving very fast and I am getting left behind more and more. Aside from that I really want to be a good asp.net developer because web development is somewhat of a passion of mine.
Books I currently have in my possession...
ASP.Net 3.5 Unleashed
Building a Web 2.0 Portal with ASP.NET 3.5
Pro ASP.NET 3.5 in C# 2008
Javascript: The Good Parts
Pro C# 2008 and the .NET 3.5 Platform
Write ASP.NET applications.
The best way to learn any platform is to write in it, and as you run into something you haven't seen or know how to do look it up. When you do that you are self teaching and will learn more and remember more if you read it form a book.
Get started here. It is a free book on MVC. Type in the examples rather than just reading it and modify the code slightly to something different. Then go out on your own. Your skills will increase quickly.
To echo what others have said, you have to write code. However, don't stop moving forward when you hit a wall. If you're stuck on "the best way to do X" (best practices) either look it up if it's simple enough, or pull it off to the best of your knowledge THEN look it up and either go back and refactor it, or the next time you come across it implement it with the new techniques you've picked up.
As for what to learn and the order to do so, I suggest focusing on what you feel you really want to pick up OR what you think is going to be the most relevant and applicable to your job. Granted, you might not work somewhere that is constantly using the latest technology, in which case you'll need to learn things on the side through some mini-projects. There's a lot out there, so narrow it down.
Another suggestion would be to start a simple project and decide to implement parts of it using a particular technology. So, for example, you might pick LINQ to SQL or the Entity Framework for your data access side. Then pick AJAX or jQuery to verify a form using simple validation. Store some data in XML and read it using LINQ to XML. LINQ to Objects opportunities are many with in memory collections, string parsing, etc. In other words think small and implement some items with a particular technology and you'll touch upon many things. From there you can begin to expand your scope and may decide to explore a particular technology further and do more with it.
I agree with David Basarab's recommendation for the free ASP.NET MVC ebook. In addition, be sure to check out the http://www.asp.net/mvc/learn/ site. There are many videos and the StoreFront series is a well known example to follow along with.
Geez man, have some fun with it.
Pick something that you'd like to make and then start making it. If a book helps you to make it faster/easier/whatever then get the book. If the project is at work, then learn the necessary skills needed to do the project and get it done.
I'd say I've learned the most by reading some blogs, and doing my own projects because they are fun. Who the hell goes and sits down and reads a 500 page book on tech crap? You could, and you could have no life. Or you could be pragmatic and use parts of the book to get real world things working and learn more about the process of completing something than just coding. Course, you'd learn coding along the way.
Even i am also in your same position. What i am doing is spending more time for coding the new things and thinking which one is working good and which one is not working good.
Along with that read the blogs , books, online videos ,online meeting , participate in online communitis like stackoverflow etc
I totally agree with the write code answer, but to add to it, you'll learn more than reading by working with the source code of a well written app that covers your weak points. Load it up, build it, make modifications, additions, and trace through it.
When you start from scratch, sometimes it can be overwhelming to decide from where to begin. With a pre-built solution, it's an accelerated start.
With coding, the hunt and peck is much more fun because you are an active participant and then after you're done coding, some sit back and read front to back about what I just did works for me.
I would not argue against books when you begin to work on a new platform.
I always try to have the one and only best book. I first start to programm an application. If the first unsolvable problem occurs I go to the bookstore or use google books to see what book has the best solution to my problem. This is not necessarily the best book. But after a couple of solved issues I know what is the best book for me. I only buy this single one.
This keeps my bookshelf clean and after a while I know my books very well. To be honest right now I only use 3 programming books at all and 1 on a daily basis.

Learning C#, ASP.NET 3.5 - what order should I learn in / what to skip? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
There's a lot to C# & ASP.net. Where should I start? What should I not bother focusing on?
Should I learn Winforms then WPF? Ditto for webforms / Silverlight?
Should I learn ASP.MVC or classic ASP.NET? If both, which first?
In the either/or cases - which will make more sense having known the other first?
What major .NET feature(s) should I learn upfront that will open the doors of understanding to what lies ahead?
I am deliberately not mentioning fundamentals like value / reference Types, Classes, object-oriented concepts, etc since they should come first, before specifics. Here, I am interested in specifics.
[edit - added detail of what my goals are]
Good points raised - "what do I want to write"?
Basically, an intranet application that monitors a set of documents and implements a workflow as a change control process. The app will also audit the documents and report problems, self-correcting common errors. A lot of the parameters will need to be end-user definable and pluggable. The document format needs to be adaptable to different proprietary formats although they are fundamentally the same. The app will be very modular.
I'm leaning towards a web interface because the client specs & admin rights will vary - a browser is really the only thing I can count on.
As you can see, it's a bit of everything.
What do you want to write? If you want to write a Windows client-side app, look into WinForms and WPF (no real need to learn WinForms before WPF, other than the way that a lot of tutorials/books will probably compare WPF concepts with WinForms concepts). If you're looking at a web app, then ASP.NET or ASP.MVC - I don't know whether you really need the "normal" ASP.NET before MVC.
Silverlight is a bit of both, in a way - rich client probably talking to a server for interesting data etc.
Before learning any of these though, I suggest you learn the fundamentals which are one step up from the topics you mentioned - things like how text works in .NET (including encodings and regular expressions), I/O, perhaps threading. Oh, and LINQ :) There are a few books which are very good on this front:
C# 3.0 in a Nutshell
CLR via C#
Accelerated C# 2008
I had the same question when I moved from Classic ASP to .NET 2.0... .NET is huge: so where should I start?
What i did was put my hand dirty and started slow, take a project (in my case was a very important project - a finance web app that would cover and automatize all 4 persons work) and start to implement, every time I didn't know how to accomplish something or I had an idea in ASP but not in ASP.NET I would go to www.asp.net or 4GuysFromRolla website and search for examples, copy/paste, understand what I was doing and ... continue to the next wall.
Took me 6 month to have everything up and running but was worst it! now that passed almost 3 years I know I did the right choice but back then ... I was scared!
now... you refer .NET 3.5, it has a bunch of new things like extensions, linq, etc... I would go by the simple part and when the times comes, "maybe I can use LINQ here, let me search how to use it on this part"
hope you follow your own path and buy some reference book so you can read something new and have a reference whenever you need "ahhh, I read this somewhere in the book, let me search... where was it?"
I bought Professional ASP.NET from Wrox as a reference book, and even today I go there to see new things, even when I'm started to use .NET 3.5, the idea is there, there is only a new way to accomplishing it.
I would recommend learning whatever you are interested in. Pick a "pet project" and try to create it using one of the technologies you listed. If you enjoy making windows desktop style applications, then go with WPF or WinForms. If you enjoy the idea of making rich desktop style applications on the web, then go for Silverlight. There will be a ton of overlap.
But in terms of core .NET Development, if I were starting off fresh, I'd recommend learning ASP.NET MVC first, as it will give you a good basis for things like: Designing for Testability, coding without ViewState, SEO-friendly URLs, etc..
It depends (awful response, I know, but let me explain)
Are you going to do any windows forms development? You mention C# and ASP.NET, so to me it sounds like you are doing Web-based programming. If so, skip Winforms and WPF for now.
Silverlight is worth checking out, but it is still fairly new so I'd make it a 2nd priority.
Now to the MVC or Web forms question. MVC gives you total control over the HTML, CSS, and Javascript that is emitted, but requires more work, whereas Web forms gives you ease of development but without 100% control over the markup that is emitted. You can do lots with Web forms and the introduction of MVC doesn't threaten the future of Web forms. MVC is very new so things are changing but eventually I see them both living happily side by side.
Regarding learning .NET in general, I've heard great things about a book called CLR via C# which will go over all the fundamentals and inner workings of .NET.
Definitely learn the fundamentals (like you already mentioned) like how the CLR handles types, garbage collections, security, "AppDomains", threading, etc.
For ASP.NET, learning the "page life cycle" and "control life cycle" are essential. Also, session state and data binding are probably good things to understand.
I wouldn't worry about WinForms, WPF, or Silverlight for now. They won't directly help with ASP.NET and are relatively easy to pickup after you've learned the CLR and .NET Framework fundamentals.
What is your primary objective - learning for fun or hireability? If you're a student and years out from worrying about a career in programming then I will strongly echo the idea of picking a project about something relatively simple that you're interested in and then just doing it.
Say you want to create an application that will track your video games collection. First you'll need a way to store the information - this will be a combination of c# and some persistence strategy like mySql or SQL Server or XML.
Then you'll need a way to present your collection and interact with it - adding, deleting and editing objects and persisting the changes. In this step, use every presentation technology that you're interested in - WPF, WinForms, Asp.net, asp.net with MVC, Silverlight - whatever you're interested in. As you learn to do one, you'll learn techniques you'll need to use in the next.
Don't pick just one - play with all the ones you have any interest with at all.
Now, if you're primarily interested in what skills will get you hired the quickest, I'd say look at your market, but it's probably going to be straight ASP.Net skills that will be the most in demand - or at least that's what it looks like from my perspective. In a couple of years it may well be ASP.Net MVC skills. In some markets though you'll have an easier chance of getting VB6 work. It all depends on where and when you're looking.
I highly recommend the following books, for learning about whats new in ASP.NET 3.5
ASP.NET MVC 1.0 Website Programming
Professional ASP.NET MVC 1.0
ASP.NET 3.5 Website Programming
Sometimes videos might help. I learnt everything I needed to know to start off with from a set of video tutorials from Total Training which is here. Pricey if you buy the disks but there is a cheaper online only option.

Categories