Web Matrix: should I use it if I am already well versed in VS? - wordpress

I have been reading a bit about Web Matrix, I like the simpleness of it. But should I even bother if I am already using VS2010 pro? I was thinking maybe for small clients that want a simple site with a blog it may make things quicker? Is it worth looking more into?
And if I do make a simple site with wordpress with web matrix, I should still be able to host it on an apache server, even though web matrix is a microsoft product?
thanks!

The question could use some tweaking. You're asking which IDE to use, but you you really mean simple - (Web Pages and or Packages like WordPress) vs complex - traditional ASP.Net (Web Forms and or MVC).
That said, Microsoft is acknowledging the various minimalist movements going on in their community. People are rejecting the idea that the complexity of the ASP.Net, WCF, IoC, DDD is necessary in every project.
Out of this movement you see projects like OpenRasta and OWIN are pushing for simpler servers and services. While projects like Nancy look to simplify the application stack. And dapper and massive both are attempts to simplify data access.
Microsoft's answers to this are asp.net web pages, supporting php, and things like WCF Web API.
For your own direction, you need to decide if the benefit of having a simpler option is worth the effort of learning multiple frameworks (say web pages for simple and mvc for complex), or if you want to only know one framework and pay a productivity penalty when putting the proverbial square peg in a round hole.

WebMatrix is about the programming framework rather than the IDE. You can use VS to create WebMatrix sites, which has several benefits over the WebMatrix IDE including Intellisense. In fact if you open a site in the WebMatrix IDE and have VS installed you will get an "Open in Visual Studio" icon on the toolbar.
I would definitely recommend using WebMatrix for smaller sites.

Related

Best practise to migrate Web Forms to ASP.NET Core MVC

I am trying to migrate a project from classic ASP.Net Web Forms to ASP.NET MVC.
While I have read through http://www.codeproject.com/Articles/38778/ASP-NET-WebForms-and-ASP-NET-MVC-in-Harmony. I have a basic idea on how the code structure, libraries and routing should be done.
For your information, the scope of my existing project is around 400 pages and 300 tables.
On top of my head I have two approaches:
Start from stretch, rewriting the whole system - Obviously this would require intensive work and take a long time. Any change made on existing system would need a duplicate change made to the new system.
Migrate the page one each - I still have a rebuild the entire core library (for accessing db), and get the page migrated one by one. For this I would assume to have two core libraries (new and old) running simultaneously with different pages connect to one of those.
Would anyone have similar experience and advise a proper way to start?
For this complete revamp I may also target at the latest technology - .NET Core and MVC6, by taking these would I have extra advantage, or some blockages I would have to take care of?
Any suggestion and opinions are appreciated. Cheers.
Microsoft is a bit hush hush on the subject but the WebForms engine is probably never going to make its way to ASP.NET Core. One might think that MS is waiting to see if the community is calling for a port, but I think they're trying to kill it discretely (not like Silverlight).
Why? Because it proved to be a bad good idea on the long run, easy to use at first, but extremely complex to master (because of viewstate and page lifecycle), with a tendency to allow average developers to build very tedious application (in french we say steam factories). Also it was very poorly adapted to modern web development (Ajax, unit testing, IoC). They tried to fix it with a couple of tweaks, but the overall architecture is just not adapted to this kind of things. MVC is a treat in comparison!
To answer your question, it's not really possible to migrate WebForms to MVC, because those are quite different architectures, and of course the architecture is what an application sits on top on, so if you change it, you might as well rewrite it from scratch.
What can help you a lot is if your app is divided in tiers (business, data access, UI). If it's not the case, you could start by doing this, properly separating the UI project from the rest. Then you would just have to rewrite the ASP.NET project and not the rest.
There are some useful resources I'd like to share with the StackOverflow community just in case you are having troubles to decide what to do:
modernization of your existing Web Forms app
migration to MVC or Core
or whether to start a new project on Web Forms, MVC and Core.
Here you go:
https://www.telerik.com/blogs/review-of-telerik-toolsets-for-aspnet-web-forms-core
Modernizing ASP.NET Web Forms Applications by Tomáš Herceg (Microsoft MVP ) - https://tomasherceg.com/blog/post/modernizing-asp-net-web-forms-applications-part-1
Migrating Old ASP.NET Applications to .NET Core by Edi Wang (Microsoft MVP) - https://edi.wang/post/2018/10/31/migrating-old-aspnet-applications-to-net-core
Choose between ASP.NET and ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/fundamentals/choose-aspnet-framework?view=aspnetcore-3.1
Migrate from ASP.NET to ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-3.1
i have come across below links
https://www.youtube.com/watch?v=CZuqMrWSano
https://www.dotvvm.com/blog/59/Modernizing-ASP-NET-Web-Forms-applications-with-DotVVM
DotVVM package helps us to migrate ASP.Net Web Forms migration to ASP.NET Core without re-writting completely.
i have not tried any production application. still have tried some sample pages. you can try this out.
I can agree that for many cases a re-write of an ASP.NET application where WebForms is used widely may do not provide any business value.
Therefore we decided to use our experience with ASP NET WebForms to develop a highly compatible port of WebForms for ASP NET Core / .NET 6.0.
We use the solution in our own ASP NET WebForms-based products and projects as well as a licensable component library.
So the Forms can still be used and you can focus on the .NET CORE/6 migration.

What is the best way to upgrade my Classic ASP WebApp? Advice and Opinions Needed

I am currently maintaining an in-house business tool for our company's timesheets and project information. I need some general advice regarding web languages and best practices.
Details:
Runs on Windows Small Business Server 2008
Combination of Classic ASP, JavaScript, CSS and Javascript
Access database backend
Large system, containing around 135 pages, of 2.3 MB total
Objectives:
Extend functionality in small ways
Possibly move to different languages to ease maintenance (AJAX?)
Separate code from HTML structure (currently VERY messy)
1) Given that I don't have a lot of time to entirely rewrite the system, is it sensible to keep going with ASP and JavaScript?
2) I've had a look at some AJAX and it seems like it would be an easy leap to include it in the page, is this an avenue worth pursuing?
3) Is it worth investigating an MVC framework? If so, does this need to be done formally with some kind of library, or are there best practices I can follow to implement MVC functionality using ASP?
4) How difficult might it be to upgrade to a 'real' DBMS such as MySQL and port the database? Is it worth doing? (Feel free to smack-talk Access)
Sorry for the length, I'm just a little lost in the giant multitude of Web standards, languages and practices.
1) For the javascript part take a look at Jquery. Normally this cuts down old javascript code to 1/10 of size and a better separation of ASP/HTML Code and JS Code. Ajax comes for free and it has a really good plugin ecosystem.
3) From my experience porting such a big system is not a good idea.
ASP Classic runs smoothly under IIS 7.5 ans IIS Express so you can take the good parts like Url Rewrite and other IIS plugins. If you need more power in your ASP classic pages simply combine them with ASP.NET pages. It is no problem to run them side by side, I usually use ASP.NET generic handler (.ashx) if I need the power of the .NET Framework to complete tasks like dynamically generated Zip files for example.
4) Upgrade to Sql Server Express.
Microsoft SQL Server Migration Assistant (SSMA) will help you to convert the Access DB to SQL Server. I've done this before with a 1 GB (no binary data) 200+ tables database and migrated the old ASP system in a week to SQL Server.
With Jquery, IIS 7.5 or IIS Express, .Net Framework 4.0 and Sql Server 2008 Express you can "pimp" your system in much less time than porting it completely.
Seriously, if the thing works and performs for you as is, then I'd "extend the functionality in small ways" and possibly add in some Ajax, if you think it would offer enough value given you limited time.
I'd certainly not consider porting a 135 page application just for the sake of porting it.
Access has its issues, but if you're not running in to them, I wouldn't take the time now to convert it.

How should I approach a Sharepoint 2010 development project coming from WebForms and MVC?

I have a good amount of knowledge in the ASP.NET Webforms and MVC worlds. Shortly I will be tasked with implementing custom web applications with Sharepoint. I have great flexibility with this project (i.e - I can use custom web apps outside of Sharepoint if that's possible) but like most projects the most limiting factor I have to deal with is time.
Here are some questions that come to mind:
Can I easily integrate a custom MVC project into Sharepoint 2010? What are the pros and cons if I can?
Same as #1 only with Webforms.
If #1 and #2 are not viable solutions, can I easily create custom web applications within the Sharepoint world? What will the learning curve be with my background?
I understand developers can now use Windows 7 to deliver Sharepoint 2010 solutions. It looks like I can use a trial of Microsoft Sharepoint Foundations 2010. If that's correct, are there any development differences or gotchas I need to be aware of before digging into the Foundation version? I don't want to get up to speed on Foundation and then find out that the Server edition (the version that will be deployed) is vastly different.
Thanks!
SharePoint is based on webforms - it is relatively easy to add custom user controls and web parts, though if you want to use SharePoint data in a completely custom web app, especially mvc you will probably need to host it seperately - you can access everything you need through the SharePoint API, but it makes the deployment a lot more complicated.
The workarounds to get webforms mvc running in the SharePoint web app tend to involve stuff that would never get past corporate infrastructure people, but I've been getting good results with precompiled razor views set up based on http://razorengine.codeplex.com/ - my version that produces code which can be included in a SharePoint project is at https://github.com/tqc/RazorEngine
In the 2007 version there were significant architectural differences between WSS and MOSS. With 2010 there aren't as many differences, so you should be ok, but it would still be better to develop on the same version you are deploying to - download a trial of Standard or one of the demo VMs - If you do a lot of .net development, chances are you already have an appropriate dev license.
What are you trying to accomplish? Are you connecting your MVC site to SharePoint or are you building something "MVC" on top of the SharePoint server?
In any case, there is an MVC SharePoint project on Codeplex here http://sharepointmvc.codeplex.com/
Here is an article on the subject http://blogs.msdn.com/tom/archive/2009/03/17/asp-net-mvc-and-sharepoint.aspx
I havent touched it, and it seems a bit abandoned to me, but it might get you along.
Check out it outlines one method of running MVC with SharePoint
Generally, SharePoint will simplify many user-oriented requirements you may have - such as authentication, permissions control and personalised areas (with MySites).
If you go with SharePoint, you almost have to build your product for SharePoint Foundation so that you can keep your customers' total costs low (SharePoint CALs, SQL Server, hardware, etc). You'll want to build friendly user interfaces for managing permission, allowing your users to create their own pages, and other provisioning tasks -- or provide rock-solid documentation on how to do it out of the box with SharePoint. With SharePoint, you should use features and Web Parts to deploy your code either way , whether SaaS or on-premise. That will make it easier to deploy and upgrade.

ASP.NET MVC or WebForms?

I'm very new to web development, have many years background on the desktop, but nothing on web, only html. I want to make a simple dynamic webpage for a product I've been working on by myself, but I don't know which of the two, MVC or WebForms, would be easier for me.
The lessons at asp.net didn't help me much, I took the "first step" tutorials for both MVC and WebForms, but I still don't see any significant difference.
What I ask for is an examplanation for a person, who's not professional at web development, or better yet, for a desktop programmer.
If you're used to the desktop, and WinForms or WPF in particular, go with webforms to more easily grok what's going on. The server controls will appear to keep their state, and it'll more a more natural progression. You'll find that the server controls do a lot of work for you, and you should be able to spin up an application using the knowledge from the WinForms world.
If you're used with desktop programming paradigms winforms should be a lot easier to learn.
If you want to go more into web-programming "as it should be" I'd personally advice you to learn MVC (anyway this is my personal opinion ;) ).
If it's a quick application with limited pages, take a look at webmatrix, that might get you up and running quickly. I'd also recommend you going for webforms if you're from a desktop environment as this was developed to mimic the event driven approach and tries to abstract the stateless form of the web.
It depends what tools you have at your disposal
The latest Visual studio has great templates and scaffolding wizards for MVC, the guts of your site will be created for you so you can focus on your product.
The world is moving away from web forms to MVC
- so the experience will also have more value on your resume (if that means anything to you)
Webmatrix or wordpress are also good options if it’s more web ‘site’ than a web ‘application’.

New to ASP.NET

I am wanting to learn ASP.Net and am just a beginner. I have done some windows c# forms development before but have no experience of web development.
I have looked at the ASP.net website but beyond this, does anyone have any ideas as to good learning resources particulary in relation to the differences to windows development. For instance, It seems that the way events work is quite different under ASP to windows forms.
Thanks you all.
Thank you very much. I will have a look at MVC. It looks even more complicated but if this is the way things are going then I would be better maybe to invest my learning in this.
I would advise you at this stage in ASP.NETs life to instead direct your attention at ASP.NET-MVC. This url http://www.asp.net/mvc/ is a very good resource for learning.
ASP.NET Forms do a good job of hiding the nature of a connection-less HTTP/browser based technology and presenting a familiar Form with controls and lots of useful events environment that Windows Forms developers are used to.
However this approach comes with a price. For any serious project there is no avoiding getting under the hood of ASP.NET forms and properly understanding the underlying technology. At this point you start to realise the significant compromises the ASP.NET Forms has had to make in order to make Windows Forms developers feel at home.
ASP.NET-MVC, on the other, makes no such compromises. Learning MVC means learning how HTTP works up-front. It also has the advantage of being a much more test friendly approach which when used properly will save you days of debugging.
ASP.NET website - seriously, it's a really good resource.
I'd seriously consider starting with ASP.NET MVC. You'll end up learning what you need from ASP.NET "classic" but you'll pick up all the goodness of MVC (testability, seperation of concerns in your code etc) instead of learning bad habits.
Google for "ASP.NET MVC", check out ScottGu's blog, Scott Hanselmans's blog, or search StackOverflow for ASP.NET MVC (use the ASP.NET MVC tag too).
One good place to start...
http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx
I know they are a bit out of date, but I still think the two Fritz Onion books give a great look at what's happening in ASP.NET under the hood.
Some resources:
asp.net (as you mentioned)
channel9
scott hanselman's blog (some useful entries)
Windows Client Homepage
W3Schools Tutorials (Useful for more than just .NET, but this is the .NET page)
I've been a .NET Windows Forms (not Web forms) developer for 1 and a half years. Then I switched jobs and started using WebForms for like... 2 years. Then I discovered ASP.NET MVC (January 2008) and since then although I still master ASP.NET WebForms I will always prefer ASP.NET MVC.
My recommendation also goes into ASP.NET MVC. You will have to learn HTTP, HTML and a bit of Javascript but after these you will master web development on ALL PLATFORMS.
A great alternative to ASP.NET MVC is ASP.NET Web Pages with Razor syntax. In fact, the latest release of ASP.NET MVC and the latest release of ASP.NET Web Pages both use the same view engine.
Here is a link to the complete ASP.NET Web Pages book:
Getting Started with WebMatrix and ASP.NET Web Pages
Also, here is the complete WebMatrix Content Guide:
WebMatrix Content Guide
Here's the description:
WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.

Resources