ASP.NET MVC Contrib Projects - c#

I am looking to get on with contributors on an ASP.NET MVC Project. I am professionally developing for a large firm and don't get enough of it here. I also teach Java Object Oriented practices at a University, and still don't feel that I get enough of the engineering with this. Simply put, I am looking to get onto a project (small, opensource) so that I can gain valuable information and learn from others in the community before I go crazy here (I have reached a proverbial ceiling where I am).
Where is the best place to look for this type of work?
My wannabe expertises... JQuery, ASP.NET MVC, CSharp, AJAX, Javascript, Memberships, and the list continues on. Previous work is mostly private (intranet), so all I have is a couple sites I have put together. http://jancel.doesntexist.com (is one that I am currently working on, won't be here forever, just waiting for customer buyoff). http://hurl.me is the first MVC C# Project I took on to learn more on ASP.NET MVC C#. My experiences started at Preview 2 and am excited to get on board here.

There are any number of open source projects that could easily use a major refactoring of their codebase (and know it). I'd start with SourceForge, find a few you're interested in for their subject matter, and start a conversation. (From your point of view, they don't even need to be currently ASP sites.)

How about MvcContrib? Another thought is Code Camp Server, but I'm not sure how active it is in terms of new features.

Related

Google AngularJS Framework - Worth the risk?

I have been asked to build a small web application for one of our clients and think it might be a good opportunity to try out a different framework for building web applications. Most of the applications we build are based on asp.net web forms and we have no yet done anything in an MVC architecture but I am eager to start building web applications in a more structured manner with the right tools.
I have been researching things like asp.net MVC and the likes which look quite good but I am wondering is there anything to be said for using something like the Google AngularJS Framework.
If possible I would still like to be able to write my server side code using c# and I have not researched AngularJS enough to know if this is even possible, although I assume I could use web services.
Has anyone had any experience with developing an app using AngularJS and if so, how was it and can you point me in the right direction for some tutorials?
We have been developing a port of a Swing fat-client application in AngularJS for the last couple of months and I think it is worth recommending. As far as learning resources go, check out the official project site (and be sure to read the tutorial) and the mailing list (the authors are very helpful).
The good stuff:
great testability
the two-way data binding is a very powerful feature, and it can be extremely helpful once you "get it"
IMO the AngularJS templates are much less brittle than using data- attributes or "special" CSS classes to mark elements that do something
it greatly reduces the need for using jquery plugins, because implementing that functionality in AngularJS is very easy (stuff like trees, tabs, accordions, etc.)
The bad stuff:
the learning curve seems pretty steep (I didn't have much of a problem, but I've seen some people struggle with it)
validations in AngularJS suck for the time being (a new implementation is on the way)
not all libraries/jquery plugins play nicely with Angular and usually you have to wrap them
the API is still being polished, so expect breaking changes (not a big problem with frequent releases and very good changelog, though)
performance is OK up until several thousand bindings on a page - most of the time this is not a limitation, but there are cases when this could be a problem.
Some pointers (if you ever decide to learn AngularJS):
some people really overuse widgets. In my experience, it's much better to use HTML "partials" + services, and only use widgets sporadically.
read source code of the library - it's the best place to learn stuff about angular
no DOM manipulation in services/controllers
if you use css classes to bind to events, you are doing it wrong
+1 #psycho's answer
AngularJS is client-side framework, so you can use any language on the server. It's designed to work well together with jQuery, with big emphasis on testing...
Here are some resources you might find useful:
TUTORIAL: http://docs.angularjs.org/#!/tutorial
API DOCS: http://docs.angularjs.org/#!/api
Developer Guide: http://docs.angularjs.org/#!/guide
Some example apps:
http://cburgdorf.github.com/angular-todo-app
http://www.fluid.ie/angular/calculate/
http://hookercookerman.github.com/angularjs-todos/
http://paul-hammant.github.com/StoryNavigator/navigator.html
Adapter for SenchaTouch: https://github.com/tigbro/sencha-touch-angular-adapter
Adapter for jQ Mobile: https://github.com/tigbro/jquery-mobile-angular-adapter
Feel free to ask any question on mailing list !
We are still in beta, but there are already several internal apps at Google, powered by AngularJS.
UPDATE (26th July 2012):
AngularJS v1.0 has been released.
For some public AngularJS-powered apps, check out http://builtwith.angularjs.org
IMHO developing something for a client which they may have difficulty supporting is unprofessional. You have to bear in mind that it will be difficult for your client to hire experienced Angular professionals, or train their own people to climb that "steep learning curve". Also, so far the documentation is not that great. Can you easily, in a few moments, answer the question, "How can I connect my shiny Angular app to my client's database?" Can your client sometime in the future easily grab some existing code and adapt it to their potential future needs? Be honest.
Compare plain old reliable LAMP development to Angular. For a "small web application" I really believe that a professional should give his client something maintainable and simple.
It's not to say that Angular isn't cool and sexy etc etc. But you have your client's future maintainability to think about in addition to the latest framework fad. Tread lightly would be my recommendation. Build your own website with Angular first and see what you think before you bestow your fabulous new skills on some trusting client.
I remember reading this SO thread couple of months back with same question in my mind, and we decided to go ahead with AngularJS, and the best decision we made on this project yet.
We are using AngularJS + ASP.NET MVC4 REST WebAPI.
Most probalbly after such a nice client side Javascript MVC framework, you would only need REST API layer interacting with Business Logic Layer at server side, and no MVC at server Side (ASP.NET MVC/Spring/Structs would feel like old memories).
You will find Angular-UI good add-on (esp ng-grid)
Soon after our project finishes, we might put some of our directive we wrote for open source world.
I have been researching the merits of AngularJS for many months to utilize as a core framework for product I am creating.
There are many aspects of AJS that make it worth while to learn. Yes there is a bit of a learning curve but its well worth it, especially if you wish to have more control on client side capability.
JQuery manipulates the DOM at run time, whereas AJS situates itself within the JS rendering lifecycle. This allows you to teach the DOM new tricks by creating your HTML Elements and Attributes. This is very, very powerful. As what you are able to do is introduce new Element behaviors for whatever your purpose and need. In AJS these custom HTML Attributes/Elements are called Directives. With the ability to craft your own Directives, you are able to build functionality that the current HTML doesn't have, pushing out capabilities that will run on all modern browsers now and into the future. Of the many approaches to inducing new behavior, AJS appears to be the safest direction one could take due to how they have chosen to implement it.
There is a huge performance gain over JQuery in AJS.
I love the simplicity of the two-way data binding, and the separation of concerns in their client side MVC pattern, which as pointed out above provide great testability. There scope object is the glue between the View (HTML), the Model (your Data) and your custom Controllers. The scope provides access to parent attributes and can be isolated at the sibling level, which is important for some reusable templates.
Templates can created and reused across your application which can contain 0 or more custom directives.
I have been using frameworks such as PRISM and MEF but I am finding that AJS has most of the same features that exist in these .NET frameworks but in a 29K footprint. There is rumors that they are working on lazy-loading which if provided will provide for some very interesting LOB type capabilities.
There are a number of UI frameworks that are being built for AJS but you can wrap any 3rd party control lib as needed, given a bit of effort. The trick is to ensure that when these 3rd party controls have changes induced, that you ensure AJS is properly notified using their apply method.
If you combine AJS with MS TypeScript within VS 2012, it provides the ability to manage and build some very impressive projects which will work well for those who are more comfortable with projects within VS.
There are a ton of other reasons to look at AJS, but if you are considering frameworks such as KnockOut I'd highly recommend AJS instead, regardless of it's perceived learning curve. Knockout is a library, AJS is a framework.
So far i think Google's Angular is great. Particular like the databinding and dependency injection.
For other js framework, there are knockout.js , backbone.js etc.
here are some posts:
angular.js example in backbone.js and/or knockout.js
I realise this post is old and you haven't gone with Angular, but I have a similar background to you, and I'm at the same point as you when asking the question.
So for the benefit of future visitors, some of the "risks" and links to resources I've found useful...
As many have already mentioned, Angular can have a very steep learning curve "Not only me, but co-workers that I consider highly smart developers, have struggled with some of the basic concepts" AngularJS is amazing... and hard as hell (link also has some good tutorial links which you asked for), and the version 2 stuff is looking more like java, which wouldn't have been a problem with your C# background, in my opinion Directives are hard enough to understand without verbose annotations and so on.
Angular performance can be poor in some cases, especially when using ng-repeat on a large number of elements Considering Speed and Slowness in AngularJS and Scaylr's experience. Other's have mentioned that performance really degrades over ~2000 bound elements, but that's usually met with arguments about how any app with more than that many elements probably isn't a good app. Keep it in mind though if you have legitimate use cases which call for many bound objects.
Angular is popular in terms of contributors, but ranks way way behind, say, jQuery in terms of production usage. Finding Angular developers might be tough, and jQuery or other developers converting have that "steep learning curve" to deal with.
Because Angular is young, you have no guarantee that it'll gain enough traction for your new Angular skills to be employable, and your new application not to quickly become legacy code
In v1.2 Angular doesn't support IE7 and below and v1.3 will drop IE8. For >=IE9, you need to follow some special coding practices.
The many javascript widgets, plugins and libraries which you might be used to using can't be used properly with Angular without heavy modification and people often suggest to re-write your component in Angular anyway.
UPDATE March 2014: after 2 months attempting to build a non-trivial densely functional one page app: There are many versions of Angular, and it's hard to say which is the best or most stable. It will depend on what you're coding with it. I'm finding some bugs Angular that are fixed by upgrading to a later version and others fixed by regressing to an earlier one. I've never had to go version shopping like this with jQuery.
UPDATE May 2014: Young, broken tools. Batarang is great until it doesn't work. I can't trust it until they fix this one.
And finally, the three best resources I've found for learning this stuff
Todd Motto's ultimate guide, and
UPDATE April 2014: this eBook chapter is quite amazing. I didn't buy the rest of the book yet, but the concept is fantastic
A full non-trivial app written in Angular (the accompanying book is OK, but doesn't really talk about the non-trivial app enough, as they appear to be saying advertised on their site)
I would say yes to this and check out John Papa's hottowel implementation as a way to do it.

asp mvc to spring mvc

I have about 4-6 years .NET experience. Primarly using ASP.NET MVC/Nhibernate/Castle Windsor/MSpec/etc in visual studio with Resharper.
I'm starting a new job in a week where we will be using Java with the Eclipse IDE and Spring Framework.
I've read up on the differences between Java and C# and I don't see myself having much trouble adapting (well except java not having LINQ, lambas, etc etc). The architecture style they're using is for the most part the same as I do things in C# as well and I am comfortable with it.
But I installed Eclipse and the Spring tool set and I am completely lost as to where to even begin vs working within Visual Studio. I downloaded a few open source spring apps and I don't even know how to get them to open in Eclipse.
Is there any good sites/tutorials/books anyone could recommend that would get me at least somewhat up to speed with Eclipse/Spring (not Java language books..)? One of my first tasks will be getting the atlassin suite set up as well (primarly Bamboo) which I've never touched before...
Welcome to the community! Those aforementioned books are great ways to learn the Spring framework, but are of substantially less use if you're trying to get started with Java development with Spring, in general, as they can overwhelming. This webinar - http://www.springsource.com/webinar/getting-started-spring-and-springsource-tool-suite - (if you don't want to fill out the form, there's a link that says, "I'd rather not fill in the form. Just take me to the download page" in reaaaly tiny fonts below "Download Now!" button. The advantage of that link is that you can download the slides + webinar. If you'd prefer to just watch it online, check out http://www.youtube.com/springsourcedev#p/c/7B74449D5224CC99/0/kSITVsOUvLU ) introduces the SpringSource Tool Suite (a freely downloadable Eclipse derivative) and introduces getting started with simple 80% case type stuff. By the time you're done, you'll have tooling, an idea of what the framework is, and an idea where to get started for a few different approaches. (e.g., "I want to build a web application," or, "I want to data access..") This webinar's an hour, and perhaps then - with a few working examples under your belt in Java - you can tackle those books at your leisure ;-)
I would recommend these two books:
http://www.amazon.com/Professional-Java-Development-Spring-Framework/dp/0764574833
http://www.amazon.com/Pro-Spring-Rob-Harrop/dp/1590594614
Both books are from very well known publishers so you can't go wrong with giving them a quick read.
Spring in Action, from manning is the best first book for learning Spring.
You can try Spring Roo as well. It's a command line tool for generating complete web application, with security i18n and so on.
It's so easy to use and you will find the greatest guide for building Spring applications.
There will be a book from manning soon and there's a short introducing book from O'Reilly, available as free download.
Of course, you must visit http://blog.springsource.com/

MVC in C# coexisting with Webforms in VB. Can it happen?

I have inherited a really awful webforms application that is all kinds of bad--an untestable hairy mess of datasets and Page_Load events. Object oriented? N-tier? Unit tests? source control? All academic niceties to the team that built this mess.
It started life as an asp classic app, got mostly ported to VB.NET. Management denied my request to "nuke the entire site from orbit" and start over.
[Insert discourse on how ASP.NET MVC is absolutely, positively the only sane way to to .net websites anymore]
I know we might be able to interoperate between the legacy webforms and mvc. The question is, can we leave the legacy code in VB and build the new stuff in C#? I want to force the conversion to C# so the team doesn't fall back into bad habits.
Is there an MVC 2 Areas strategy that we could use here?
I'm not surprised the idea of a total rewrite was shot down. In general that is a recipe for delay and more bugs, regardless of how buggy the current project.
As far as I know it depends on the kind of project. If the existing project is a web application then no you can not. You could reference external libraries built in C# due to the CLR, however, you will not be able to bake C# code right into the project. This is done all the time and is mostly acceptable.
If the existing project is a web site project then I would have to say yes you can. However, you should not willingly do this unless there is an absolute need to do so. This is just asking for a difficult to maintain project and essentially requires you to do a lot of management in the web.config. I would strongly advise against doing this.
site reference: http://timheuer.com/blog/archive/2007/02/28/14002.aspx
I think you should be able to put this method together with those from the Google search mentioned by an earlier poster. Its going to take a bit of work though.
Additionally, coding practices are pretty much entirely unrelated to the language and from my experience working with mostly web forms and a little MVC, both have their time and place. I would look at laying down a set of practices that must be followed and enforce them using code reviews. Any new code you write would be kept clean and tight while you can also update old code to use standards.
I'm intrigued by your implication that the team's bad habits are caused by use of VB. There are plenty of bad habits in any language: the trick is not to switch language, but to learn good habits.
Anyone's post about this kind of thing is going to be opinion - and in my opinion you'd be better off teaching them to program properly in VB than making them learn a new language that they may struggle with. I've seen great, stable, maintainable VB code and I've seen horrendous, messy C# code. Try not associate a programming language with the quality of output of a team that happens to be using it.
(For the record, I develop in both VB and C# and would always choose C# given the choice - but not because I think I write better code in C#.)
It is possible, essentially by making all the views, etc. in the MVC project embeddable, adding it as a reference to the VB.Net project and then registering the routes.
It's a bit more complicated that that, Matt Honeycutt has a series of posts roughly outlining how he did it here:
http://trycatchfail.com/blog/post/ASPNET-MVC-3-Razor-C-and-VBNET-WebForms-A-Tale-of-Black-Magic-Voodoo.aspx

Looking for feedback from people that have gone from 100% web development to winforms

I have been a web developer for my entire development career. Nearly 100% microsoft focused the entire time. I have been using .Net, both C# and VB.Net, since beta. I now find myself in a position to where I have the opportunity to start doing some WinForms development in C# using the 3.5 framework. As with anything new, I am excited about the learning opportunity in front of me.
I am curious if anyone has any suggested books, articles, feedback, etc on the topic of transitioning from web development to winforms in the .Net world.
I think it goes without saying that the paradigms are very different. I really enjoy C# because of how easy it is to write great windows software.
Start by getting into the IDE and creating a real but small project. One of my first C# projects was a light weight budget program. That took me into many areas of C#, from XML handling to custom windows controls, to debugging, and more.
Experience is the best teacher. Take time to look at the function lists, and peruse the documentation. Get a feel for what is in the thousands of classes that make up .NET.
Reading books can be nice, but getting your hands dirty (in conjunction with a good book) is far more effective.
Set a goal and go for it, you will have no problem learning all about it. Don't be afraid to try things and take risks -- it helps you learn the system.
If you are moving from Web to Windows, there is a some significant differences between the two enviroments. Some good and some are bad. If your .Net based and moving to 3.5 look into WPF since it is the best of both worlds for Web developers converting right now.
I do know of some common mistakes made by web developers making the crossover. They would include:
Opening database connections on every form and every database calls. (In Windows Bad)
There is no ViewState concept or Stateless concept in Windows
I am sure there is a few more that can be added but right now I can't think of an exact list.
I do agree with gahooa, look at doing a small project and read as much as possible on the subject. Approach it as if you never developed before, and the skills you gained over the years will automatically kick in when needed.

How to stop worrying about using the best materials and just start learning .Net?

For the past few years whenever I learn something I tend to spend way too much time researching on the best materials for the subject than actually studying it. What should I do to get over this mentality? I am stuck. How to stop worrying about getting or using the BEST books, training videos and online materials on .net and just start learning?
Start doing a project with a deadline. You will code and learn together. If you cannot do that at work, think of a hobby project with some real requirements (like building a photo sharing site).
I completely agree on the just start coding philosophy. Another idea for a project is to go through the Project Euler exercises. They are somewhat simple math problems that get progressively harder. It is great if you can not think of a project or only have a little bit of time. Then just use a reference book, or the internet to learn what you need to about the language specifics.
Go download Visual Studio Express
http://www.microsoft.com/Express/
Go buy one of the following books:
ASP.NET 3.5 Step by Step
C# 2008 Step by Step
VB.NET 2008 Step by Step
From my experience (when I first started with .NET back in the 1.0 days) the Step by Step books from Microsoft are the best at just starting out and getting your feet wet with .NET.
1) Stop researching
2) Start programming
Seriously, the only book you need to program in .NET is CLR Via C# by Jeffrey Richter. Read it cover to cover (save the first couple chapters until you've read the rest, btw), and start coding. When you hit stuff you have problems with (Linq, WPF, source control, unit testing), come here.
Buy visual studio 08, devise a small project, and complete it.
Make a deadline for yourself and don't push it back.
Buy a basic C# book for reference, don't worry about which one.
You can do it!
Firstly, don't beat yourself up for not having done things the right way before, as I'm sure you know, there never is a right way. Also, some of that searching for the best resources will pay for itself when you have a better understanding of things than the next guy. And, as has already been said, do a project, pick something harder than the usual, trivial examples, so that you have to think and ask questions and do some research. Finally, if you have a blog then post about what you are up to, that way you'll have more of a sense of a commitment to stay working on the project rather than bailing out as it gets hard, especially as that is usually the time when you are about to actually learn something (this works for me anyway!)
There is no single best resource on anything. The best way to learn is to practice. Get any book to get yourself started. Then just start writing some code at home. Play with the language and the platform. Read blogs, browse the questions here. You will start discovering and learning nuggets of information.
Others mentioned buying Visual Studio 2008. It can be an expensive investment although it is totally worth it if you are a independent developer/consultant. However, if you just need something to get you started with coding, get the free Visual C# Express. You can always grow into the professional SKUs when you need it.
The best way is learn by doing!
When you work at a new job, you learn a lot because you have great individuals who transfer a lot of knowledge they find useful. You can review how they do things, which parts are done well and which parts are done poorly.
Learning by isolation is hard especially when there are so many resources out there.
I recommend connecting with individuals in your local community user group or an online group, or start your own group. Many of these individuals will have had real-world experience and can help direct your learning path more effectively.
Find an area of .Net you'd like to use, e.g. console Applications, Windows Applications, ASP.Net applications, web services, and just build a few little "getting your feet wet" sort of things like the basic "Hello World!" example or doing some simple computations or using an MS-SQL back-end if you do get SQL Express or the richer versions.
Don't forget that if you don't get in, some things may pass you by. How many ASP.Net 1.0 or 1.1 apps are out there using older systems that you may not be familiar with yet may be an incentive to start doing rather than trying to find the BEST that will be out of date in a few years. Take some of the ideas from a book like "Refactoring" by Martin Fowler if you want to program something a little bigger than the simple "Hello World!" program.
Download Visual C# Express 2008. Google for intro tutorials. Dig in and explore yourself.
This URL is all you need to get started with .NET:
http://msdn.microsoft.com/en-us/vcsharp/aa336768.aspx?wt.slv=RightRail
If you want mastery of .NET, there a lot of different ideas, but only one official self-education track. Get the official MCTS / MCPD training guides from Microsoft Press. These are searchable on Amazon by Exam number, such as Exam 70-536. But as long as you know how to Google for questions and tutorials, you don't need much else.

Categories