Click here to Skip to main content
15,914,452 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Question.net Pin
Member 1257929012-Jun-16 7:59
Member 1257929012-Jun-16 7:59 
AnswerRe: .net Pin
Richard MacCutchan12-Jun-16 23:00
mveRichard MacCutchan12-Jun-16 23:00 
AnswerRe: .net Pin
F-ES Sitecore12-Jun-16 23:32
professionalF-ES Sitecore12-Jun-16 23:32 
AnswerRe: .net Pin
Richard Deeming13-Jun-16 2:05
mveRichard Deeming13-Jun-16 2:05 
GeneralRe: .net Pin
ZurdoDev15-Jun-16 9:40
professionalZurdoDev15-Jun-16 9:40 
AnswerRe: .net Pin
John C Rayan14-Jun-16 4:24
professionalJohn C Rayan14-Jun-16 4:24 
Question.net Pin
Member 1257929012-Jun-16 7:57
Member 1257929012-Jun-16 7:57 
QuestionWell after the last 5 days, I feel unchained from the Microsoft ball now! MVC with Bower, NPM and Gulp and Docker Pin
jkirkerx10-Jun-16 7:35
professionaljkirkerx10-Jun-16 7:35 
Well what an adventure after 5 days of trying to figure all this out. But after getting my project up and running, I now see the benefits as a whole, and it was well worth it. Many of the earlier questions I had about MVC have now been answered, such as what's up with the Razor, what is Webgrease and how to use it, and how do we minify our CSS and Script files.

So while we were watching Steve Ballmer try to buy the LA Clippers, the new CEO Satya Nadella has been working to let Microsoft developers have more fun creating apps, by unchaining us from the boiler plated project templates and letting us choose how we want to work.

My 5 day journey in the last week has exposed me to all sorts of new concepts that appear to be working great out there such as Node.js, but I digress, and will return back to the topic.

Bower:
So in case you didn't know, Bower is another way to download packages that can be automated. It's not a replacement for NuGet, which is still viable for server side packages, but the preferred way to download front end frameworks and packages such as Bootstrap and JQuery.

Bower compared to NuGet Packages
The NuGet client packages were sort of lame. I used NuGet for Font Awesome, and a couple of other front end packages, and had to go through all sorts of hoops to get them to work. Many of the packages were broken or outdated. Bower allowed me a very easy way to get the latest version of the package up and running in very little time, and did the dependency checking for me as well.

NPM
NPM is sort of like rpm in linux, that runs off Git, which is the git repository. You can download packages by command line such as npm install uglify -save-dev, which will download the package and save it to a package.json file, to use later.

Gulp
Gulp is a JavaScript file that uses the packages downloaded by NPM to customize your project. So with the package uglify, I can write a gulp command to minify my JQuery script files, add the suffix .min and publish them in my custom location.

Gulp can do many things, you can wrap script tag elements in HTML content and use Gulp to read the HTML, bundle those scripts and uglify them. Build customer CSS from Sass sources and minify them. So take for example JQuery 3.0 was released today, I think I'll just change the version number in my package.json and upgrade my project today, for it runs automatically.

Running Build and Clean
Put it all together, bind it to your project's pre-build, post-build and clean events, and you have a very powerful solution that is easy to work on and maintain.

VS2013 - Stripping MVC almost to the bare bones
Yes I had to strip my projects Nuget packages to the bare bones and figure out how to replace the functionality that Microsoft had injected into my project. What a mind bender as to what did those packages did in the first place? Microsoft was quite clever and had the intentions of producing the best possible results for an entry level MVC programmer, but I wanted more infinite control over how my project would be published for production use.

Razor
Well I just got my head out of the sand and realized that I don't have to use Razor. There are many other solutions out there such as Angular.js which actually looks more functional to me. But I have already started with Razor and will try Angular.js in my next project.

Deployment using Docker on Linux or Windows
I had no idea that Docker was out there. Docker is a container that includes a small version of your operating system and your production project. It's not a Virtual Machines, but the concept is similar. So you can develop in your Docker container, and just deploy the container to a cloud service or in house server. This eliminates the headaches that have long plagued us, in which hey it works in development but not in production.

And it doesn't have to be a Windows OS, you can develop on a Linux platform using the new Microsoft ASP.Net for Linux and Mono I believe. Build your Linux platform in Docker, and just deploy that Docker container to a Windows or Linux server running Docker.

Final thoughts
I'm really excited about this today. Makes me want to upgrade to Windows 10 and VS2015 to start using Dockers. I'd love to go back to Linux for serving my apps, and other open source programs and database servers.

I'm very happy with my current project right now! and see infinite possibilities with it today. I love the MVC platform and I'm not going back.

I wrote this because I still see the old webforms questions about Gridview, binding data to server controls, etc. And with all due respect, I think Code Project can use an upgrade in thread topics to cover these wonderful new technologies, and lead the way for all of us to benefit from them. I'd like to see some discussion on Node.js, and TypeScript.

I have many programmer friends that think MVC is sort of dumb, it's like classic ASP so whats the point? And I remember reading an earlier question as to why I should switch to MVC. So I hope this post provides a more convincing argument as to why MVC over webforms.

You guys and gals have a great weekend!
PraiseRe: Well after the last 5 days, I feel unchained from the Microsoft ball now! MVC with Bower, NPM and Gulp and Docker Pin
John C Rayan14-Jun-16 4:51
professionalJohn C Rayan14-Jun-16 4:51 
GeneralI went ahead and upgraded to Windows 10 and VS2015 Pin
jkirkerx15-Jun-16 7:42
professionaljkirkerx15-Jun-16 7:42 
GeneralRe: I went ahead and upgraded to Windows 10 and VS2015 Pin
John C Rayan15-Jun-16 22:08
professionalJohn C Rayan15-Jun-16 22:08 
GeneralRe: I went ahead and upgraded to Windows 10 and VS2015 Pin
jkirkerx16-Jun-16 7:14
professionaljkirkerx16-Jun-16 7:14 
GeneralRe: I went ahead and upgraded to Windows 10 and VS2015 Pin
John C Rayan17-Jun-16 2:14
professionalJohn C Rayan17-Jun-16 2:14 
Questionvisitors tag printing. Pin
forest4ever10-Jun-16 0:28
forest4ever10-Jun-16 0:28 
AnswerRe: visitors tag printing. Pin
aarif moh shaikh12-Jun-16 19:48
professionalaarif moh shaikh12-Jun-16 19:48 
GeneralRe: visitors tag printing. Pin
forest4ever12-Jun-16 23:30
forest4ever12-Jun-16 23:30 
QuestionDynamically change grid.mvc in partial view in MVC? Pin
dshilpa8-Jun-16 19:43
dshilpa8-Jun-16 19:43 
AnswerRe: Dynamically change grid.mvc in partial view in MVC? Pin
Richard MacCutchan8-Jun-16 20:59
mveRichard MacCutchan8-Jun-16 20:59 
GeneralRe: Dynamically change grid.mvc in partial view in MVC? Pin
dshilpa8-Jun-16 22:30
dshilpa8-Jun-16 22:30 
AnswerRe: Dynamically change grid.mvc in partial view in MVC? Pin
John C Rayan8-Jun-16 22:55
professionalJohn C Rayan8-Jun-16 22:55 
QuestionPost ifram embedded PDF editable document to ASP.Net MVC Post Action Pin
Asjad ali kash8-Jun-16 1:01
Asjad ali kash8-Jun-16 1:01 
Questionsorting of a image column Pin
mrakshay12127-Jun-16 23:56
mrakshay12127-Jun-16 23:56 
QuestionTrying to create database using Code First Approach Pin
indian1437-Jun-16 16:20
indian1437-Jun-16 16:20 
Rant[REPOST] Trying to create database using Code First Approach Pin
Richard Deeming8-Jun-16 1:41
mveRichard Deeming8-Jun-16 1:41 
AnswerRe: Trying to create database using Code First Approach Pin
jkirkerx10-Jun-16 7:56
professionaljkirkerx10-Jun-16 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.