Microsoft's Concurrency and Coordination Runtime quite literally saved a project that was running into major issues with deadlocking. Since then I find that I use it more and more frequently for almost anything that requires asynchronous coding producing results that run lighter and faster than before. I can honestly state that it has transformed the way I think about multithread/multicore dev. Despite my personal love for CCR, there appears to be very little buzz surrounding it on the web and was wondering if anyone can offer any reason for this. Are there better alternatives, or is it a lack of promotion from MS, or are people simply happy with the existing tools?
I would suggest that TPL Dataflow, to be released as part of .Net 4.5, will eventually supersede the CCR. Most concepts in the CCR have an analogue in Dataflow although it isn't necessarily a straightforward porting exercise.
That said, the Robotics Studio Developer 4 Beta 2, released November 2011, does include a version of the CCR for Silverlight 4.
The licensing around it is a bit of a pain, from what I remember.
I think most people are waiting for Parallel Extensions in .NET 4.0. I know it's not quite the same thing, but it's still a lot better than what's in the framework at the moment - and although the continuations don't work the same way, at least they're there :)
I suspect that Parallel Extensions has had rather more work on it than CCR - although I'm sure the CCR work inspired some of the design of PFX as well.
I, too, have a personal love for the CCR... I certainly have not seen anything quite the equivalent of it in .NET or elsewhere. I think it's too bad that I think Jon's right and it will likely be relegated to a niche of enthusiastic fans like us, while most mainstream .NET multithreading will probably be done with the Parallel Extensions.
I'm particularly disappointed in this prognosis because I think more could be done to promote it - say maybe fit it into an enterprise reliable async message bus-type framework, which I think is lacking a coherent story in .NET. Also, from looking at the Microsoft CCR/DSS Site I would probably never have thought to try it... I don't understand why it was packaged up this way - other than the fact that several companies ripped it out of the Robotics toolkit and just ran with it before MS thought it had a purpose beyond robotics.
Anyway, you're not alone... and there are lots of other CCR 'enthusiasts' as well. Here's a neat 'flow' based CodePlex project that wraps the CCR in an interesting flow paradigm.
I have been enjoying using the CCR in two major projects so far. The first one is terrible (didn't really get the Causality pattern idea) And the second one is coming along brilliantly (Web crawler)
Both projects are utilize the message based paradigm to avoid waiting for slow running IO operations. The CCR is quite good to work with once you solve the lack of a compatable ORM mapper. (I'm considering releasing some of the plumbing code that i've written to save other people the heart ache)
Having said that, RX looks quite interesting. I'm curious how it compares in terms of Error handling, speed and reliability.
Microsoft Robotics Studio 2008 R3 is now available and now free for everyone to use.
Related
I have just started looking into .net MVC and I really like it.
There are a few developers within our team who think the same. But before we are allowed to use it for any project we need to get the approval of management.
What would be the best way to convince management(which know little about programming) that this would worth while and it could have some cost benefit?
My belief is that it will force us to write better more accessible sites which are a lot more testable than web forms. Which in return would mean less bugs and higher customer satisfaction. But I have no evidence of this.
EDIT:
We have a team meeting in 4 days, this is where I will be making my pitch to the team and management.That gives me two weeks to learn more on MVC and do a presentation.
Ok, I'm a manager. I've been one for more than 10 years. Luckily, I've been able to stay very current with my technology passions, so I think I can speak from both sides of the fence.
Managers are going to be concerned with three things here: risk, cost, and the status quo. So, when you present your plan, you're going to need to address each of these:
Risk:
Explain to them that the risk here is very low.
MVC2 is just an extension of MVC, both of which has full source code available (management speak: if we find a problem, we don't need support. We can fix it ourselves).
There's a ton of community support. (management speak: I can go online and get answers to any questions I have in a matter of minutes).
Heavy-hitters at Microsoft are pushing this (management speak: Microsoft is encouraging their developers to use this technology).
Cost
Talk about the fact that the technology is free, with a ton of community support.
Be ready to talk about ramp-up costs for any developers that don't have MVC experience. They're going to be less productive at first. Let your manager know that the developers will come up to speed quickly, and that MVC provides more efficient coding approach than traditional web forms.
Be ready to talk about costs and risks associated with ongoing maintenance. If you've already got a ton of web forms out in the wild, this will present a second skillset that developers will need to maintain. Find ways to convince management that it will be possible to maintain this skillset.
Status Quo
Many people become managers because they want a level of security and control in their life. If this is the case with your manager, they'll be interested in maintaining a comfortable status quo, and not making significant changes. If that's true here, you need to make the case that this really isn't a major change from what's being done today. Assure them that you have a back-out strategy. Talk about how this is really a proof-of-concept for MVC use in your organization, and that management will have an opportunity to review the success of the project prior to you ever suggesting MVC become a standard.
Really what it comes down to is the fact that ASP.NET MVC forces developers to write better, more scalable, and easier to test code. It moves them away from the crapshoot that webforms often can be, and in a direction oriented toward quality architecture and good clean code that follows more rigid conventions.
One definite drawback of MVC is that the View structure required by the webforms view engine (default) encourages you to write spaghetti code in the views that is, at times, a nightmare to maintain. Given this fact, you might even want to pitch them with the new Razor View Engine that was recently announced. With it you can write some extremely clean view code that even the non-developers at your company could manipulate without bringing mass death and destruction to your application. Compared to the markup in the webforms view engine, Razor's markup is pretty much beautiful.
Also, check out this really solid blog post by my buddy Matt Hidinger which does a great job of breaking down why MVC is so awesome.
When you speak to management just be sure to emphasize the all good points mentioned so far, and then compare them to all the bad that webforms is/can be. Be practical and realistic; if you have enough people on your team that are ready to jump on board with MVC then it's pretty much the best possible decision you can make, in my opinion, anyway. You may even want to take a moment to show them some of the great sites that use it- like Stack Overflow.
Personally, I have launched about 15 separate sites built with ASP.NET MVC and as such I feel I have a pretty solid understanding of it. I can wholeheartedly tell you, from my experience, MVC is the best thing that ever happened to ASP.NET.
It really depends on what you're comparing it to, but assuming it's an alternative to webforms, a few items to mention:
better testability
more control over output, which can help target other devices
leverage existing knowledge of .net
MVC framework encourages you to write more structured, testable and, as a result, more maintainable code. As the biggest costs in development are in the debugging and maintenance, those benefits alone should be a good validation. That said, it's still possible to code crap in MVC and that shouldn't be overlooked. If your company has a lot of expertise in another development framework then you really need to address the deficiencies in that and how MVC can rectify those deficiencies.
I would start by looking up blog sites that support MVC and compiling some of the advantageous features of MVC. I would start with Scott Guthrie's initial blog post regarding MVC - it outlines some great features - http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx
If you are looking at trying to bring MVC in and need to convince management of the value, your best approach is too show how it can reduce long term support costs. Having an application that has well developed unit tests with decent code coverage can ensure quality over the life cycle of the application because you can higher level of confidence that changes you introduce have not broken pieces of the application. This doesn't negate the need to test the application, but you will find breaking changes faster. An approach utilizing MVC over MVC is a much more flexible platform for this testing.
There are many studies you can utilize that show the long terms support/maintenance costs of an application are often greater than the initial development costs. Stephen McConnell's Code First has a good discussion of this.
Good luck!
As opposed to what? Management would rather you wrote poorly-designed code? I'm surprised it's even an issue, in that whatever else they're asking you to do, by the current state of the industry, is self-evidently the wrong decision. If they know what MVC is, I can't see how any reasonable person would want you not to use it.
Sell it as an ASP.NET component, only made by Microsoft to incorporate some of the newer web 2.0 technologies moving forward. Tell them it will enhance maintainability while reducing development time. Tell them it uses existing infrastructure, and is more performant. Tell them it uses existing investments in training and software. Tell them it is more efficient, and makes it easier to fix issues and build enhancements. Tell them they'll get more out of their development team without allocating more resources.
I think Erlang is very well suited for server systems developed in my workplace (currently developed in Java). I am a bit skeptical how this would be accepted both by developers (who have no idea about functional or Erlang) and by managers.
Any ideas on how to approach the issue? I am thinking about some hybrid system, where the hardcore highly reliable infra uses Elrang, and app specific stuff developed in Java (as nodes?)
There are a few approaches, and neither have any guarantees to actually work
Implement something substantial in a short time frame, perhaps using your own time. Don't tell anyone until you have something to display that works. Unless you have a colleague in on it.
Pull up lots of Erlang projects that are good demonstrations of the features you want. Present it to your managers and try to frame them about the risk in keeping using Java with this kind of technology available.
If the company you work for actually have a working code base in Java already, they're not likely to take you seriously when you suggest to rewrite it in another language.
The true test that you believe in Erlang being a much better choice: Quit and start up a competing company and bring the technology insight you have in your current industry. Your managers are really comparing a similar risk-scenario as you would do if you were to quit your job, and they are looking for the same assuring facts for success as you would do, to consider leaving a "safe" paycheck.
As for how to integrate, check out the jinterface application in Erlang. It allows Java code to send messages to Erlang nodes, and it allows Java to expose mailboxes to the Erlang nodes as if there were Erlang processes.
It's all about ROI (Return On Investment) to a manager: a manager will be concerned about performance (of the company). In order to appeal to his business nature, you'll have to make a case for it using dollar$ (or whatever appropriate currency).
Beware that undertaking a "skunkwork" project on the side to "prove" your solution based on Erlang might backfire: "so you had time to play with Erlang, why didn't you spend the time on the project then?" (Of course, not all managers/companies would think this way).
You have to take into account the whole proposal e.g. impact on the team, skills to be developed etc. It's all about money.
If I have an advice for you: start small, plant a seed, nurture it and watch it grow.
A wise man once said to me:
"It's not about technology, it's about
the product & market".
Start by not targetting a rewrite but using erlang for a new feature/project. Rewrites can be expensive and taking a chance on erlang for something that is already a time consuming and costly undertaking is a hard sell. But if there is a new piece that could be done in erlang and java, you stand a better chance. The project will be small enough hopefully that you can discover early if erlang is a good fit and adapt accordingly. And when erlang proves itself in that project you will have better data to make your case with.
We're introducing RabbitMQ into our infrastructure, which currently runs a combination of C++, Java and Python applications. I'm not specifically intending to move the team towards Erlang, but if I were, introducing a well-written third-party tool that just happens to use Erlang is a very good way to get the foot in the door.
One major caveat is that while Erlang is a wonderful language to learn, the surrounding technology (OTP in particular) has a huge learning curve and is extremely primitive in many ways (debugging, IDE's, etc.). It is getting better all the time, but reluctant converts will crucify you if you don't warn them about the pain of learning to program in a radically different environment. Even simple things like the lack of code-sense technology (E.g., type 'foo.' and the IDE tells you what methods you can call on foo) can leave a really bad taste in the mouth.
I want to learn a framework that promotes good programming practices and is respected by the programming community.
However, I also want a framework that I can use for a day job.
Which one would you recommend?
This question comes from my experience of learning the basics of Django because it was highly acclaimed by developers on Stack Overflow and Hacker News. However.. there's hardly any jobs in my area (NYC) that are asking for Django developers.
As a long-time ASP.NET guy, I've recently gone through a similar decision process to figure out what other web frameworks I should try. Here's what I learned so far which may apply to your case too:
framework/platofrm choices (and hence job opportunities) are highly regional-- the Bay Area job market differs alot from what you'll find in NYC, Chicago, Montreal, or London. Look at local job listings (craigslist and indeed are good places to start) to get a good sense at what's in demand.
similarly, usage varies alot based on the size and type of company. if you want to get a job in a large company, Spring MVC and ASP.NET MVC may be your best bets. In small companies, DJango and (especially) Rails seem to be on the rise.
usage also sometimes varies by industry. for example, many HR apps seem be to .NET based, while financial/banking apps seem to favor Java. if you want to work in a particular industry, check out what up-and-coming companies in that industry are using.
when investing your scarce time in learning something new, favor technologies which are on the upswing of the adoption curve (e.g. Rails) rather than frameworks with wider adoption which may not be growing as fast. Also be wary of very early or niche frameworks which may not ever gain wide adoption.
the one common thread between most (or almost all) frameworks gaining in popularity is that they're MVC frameworks and rely heavily on a solid understanding of REST. Learning those concepts in depth is a good idea.
before deciding to invest a lot of time in one framework, gain a basic understanding of several of them, so you can get a reasonable sense of what you like and don't about each-- and so if you end up applying for a job using a framework you haven't learned, at least you'll be able to talk intelligently about it.
If you focus on what you enjoy, you'll be more motivated to learn it. For example, personally I found Rails (regarless of employment opportunities) more interesting than Spring or Django, so I decided to focus on Rails first. Others may have different impressions-- follow your programmer instincts. That said, there are often few jobs using technologies you find fascinating, so try to strike the right balance: technology you like that many companies are actually hiring people to use!
once you answer the basic "what framework" question, there are many more questions lurking, including picking a javascript framework, validation framework, an ORM, etc. Don't worry too much about those choices yet-- when starting, just pick the default implementation for your framework. But as you get more advanced, the same argument about frameworks also hold for those other things-- e.g. it's useful to know a few ORMs.
Personally, I decided on this approach:
continue building stuff in what I knew best (ASP.NET) but transition all work to ASP.NET MVC, where I can better understand MVC and REST concepts which apply cross-platform
learn JQuery (again, platform neutral)
blow off the ORM choice alltogether for now-- too many other things to worry about
build a few projects in Rails, which is the framework I see used most in the newer SF-Bay-Area startups I've been looking at
learn the basics (e.g. read a book or two, try a few samples) about Python/Django, Java/Spring, and Groovy/Grails.
I've encountered real projects at cool, small companies using Django, Ruby on Rails and (eiuw!) even Zope. .NET is for teletubbies - I've only ever heard of it being used by big corporations that don't know better.
I would say that knowing two or three is better than knowing one that is widely used because you will gain a better understanding of how it works as a concept. For instance if you've only used Java, there is something probably missing in your understanding of OOP, because you're pigeon-holed into thinking about it in one way. If you already know Django though you Spring would probably be a good compliment to that.
i'd probably say ASP.NET MVC. I always see lots of .NET jobs around and this seems to be a solid framework which i think in fact powers all the stackoverflow family. As a PHP developer i must also make a mention of Zend Framework which is used by a number of big sites including bbc.co.uk and is now frequently mentioned in advertisements for PHP jobs.
I want to learn a framework that promotes good programming practices and is respected by the programming community. However, I also want a framework that I can use for a day job.
Sorry to be the bearer of bad news here, but those two desires tend to conflict. IMHO most business managers tend to go for (ugly) rapid development on top of CRMs or other higher-level 3rd party codebases. Building elegant websites from the ground up mostly happens in startups, or true web companies where the website is the sole product. There are not that many of those companies; and many of those that seem to fit are actually a mess on the inside, i.e. due to time pressure, messy legacy code and many other reasons you often don't get to write according to "good programming practices" anyway.
I agree with Kaleb Brasee that Java and .NET are the two main platforms when job availability is a priority.
Every job market is unique, so look at job openings in your area, or call a handful of recruiters and ask what they see a need for / could easily place you in a junior position for. What I'm seeing is that Microsoft Sharepoint is in demand, and a few other regional CMS'es are in demand (in Denmark I see Sitecore regularly).
I think ASP.NET MVC 2.0 together with MVC Areas and ASP.NET Dynamic Data will have a good story, a good solution, for many of those bosses who want rapid development. And I think the resulting code could be quite okay, or at least not bad compared to many of the "CMS beaten into something else" sites that exist. But this is a brand new thing for the .NET platform, and it will need to be sold to the decision makers first...
Bottom line: If you want job security first and foremost, then look at large CMS's like Sharepoint, and work on other technologies in your spare time. Optionally you could take a job at a startup / a web company later; but look before you leap.
Have you tried Spring MVC? Many companies do use Java for web-apps (or .NET) and web service based applications.
Since you mentioned Ruby on Rails, you might want to learn Ruby on Rails. It has got some good programming practices in it and a very well thought architecture. The Ruby community itself have also (in my personal opinion) created very innovative frameworks and highly favor testing and quality. You can see this by the innovative testing framework like Cucumber, webrat, shoulda, coulda, rspec, test/spec. Many startups also uses Rails as their platform, so it should be easier for you to get a job. You can start looking at Working With Rails and 37signals job board. So there is a good ecosystem inside Rails and Ruby community.
But the downside of Rails compare to Django is mainly there are too much magic (less explicit) and the docs is not as good as Django. If you want to get a Django job, try looking at several news site because Django grew up from a newspaper site so it is adopted alot in news based sites.
I would recommend ASP.NET MVC, Ruby on Rails, or Python/Django, they all seem to be popular and successful, and based on the MVC paradigm which is definitely the right tool for the job when it comes to the web.
.NET and Java are by far the 2 largest platforms used by employers, and hence the most in-demand when searching for a job. Java has a few popular frameworks, with JSF, Spring MVC and Struts all seeming to be about equal in demand. I don't use .NET, but from what I've seen, ASP.NET and ASP.NET MVC are the major ones.
I would say that most of the frameworks mentioned here promotes good practices. But that doesn't neccesarily mean that the companies using those frameworks are actually following those good practices! In fact most probably aren't. So don't expect too much.
You see, places like Stack Overflow, Hacker News etc. are a great way to connect with people who really care about their craft. Sadly this is a minority. There are millions of programmers in the world. Most of them suck. The code they write sucks. They don't care. They are not interested in improving their skills. They just want to learn the bare minimum required to collect their paycheck, go home, feed the dog, spend some time with the family, watch some TV, go too bed and do it all over again the next day.
Okay that was a bit harsh :) What I'm getting at is that you are probably better off asking this question to some of the managers at the companies where you would like to work. My guess is that most of them will answer .NET or Java. If you are up for a laugh ask them why they chose that particular technology over something else, and see how many buzzwords they throw at you ;)
I believe a functional language would be helpful for the domain my company works in (financial) where we read in a ton of data, do some mathematical processing on it, and then store it again. Something which is fundamentally very parallelizable and not well-suited to extensive object-graphs with state (in my estimation).
As a .NET shop, I immediately thought of F# but I'm wary of the fact that the words "research" are prominently interspersed throughout almost all of the MS materials on it.
Does anyone know if F# is going to be something which MS is going to support going forward or would I be better of trying to convince the powers that be to go with Scheme/Haskell/et al?
It is going to be in visual studio 2k10 as a formal language.
(See e.g.
http://blogs.msdn.com/dsyme/archive/2008/12/10/fsharp-to-ship-as-part-of-visual-studio-2010.aspx
http://blogs.msdn.com/dsyme/archive/2009/05/20/visual-studio-2010-beta1-with-f-is-now-available-plus-matching-f-ctp-update-for-vs2008.aspx )
Microsoft seems to be really gung-ho about promoting F# as a first-class language in the new Visual Studio, so I expect that they will continue supporting it with tools and documentation for quite a while.
See also e.g.
https://stackoverflow.com/questions/966039/which-companies-are-using-f-internally-and-what-are-they-using-it-for
which is suggestive of a few big companies that are already using F#.
"Spring.NET is an open source application framework that makes building enterprise .NET applications easier."
Springframework
They say that Spring makes .Net development easier. Then I see the manual which is long as anything.
Chapter 5. The IoC container
And then I see some mysterious stack trace errors when I run a project that has Spring. How is Spring making my life easier, when everything is so hard?
Edit: The errors come when I run the project, not when I compile like I first wrote. I understand that Enterprise applications need more complex frameworks than normal applications. But they shouldn't be complicated even in that case. I mean, if I want to write some logic, I shouldn't need to go through lots of other stuff.
Edit: I don't have a choice but use Spring, if I start using an existing project that has it.
Note that it says it makes enterprise .net applications easier. Enterprise applications are not really the same as normal applications. They are very large scale applications, requiring designing around massive scalability, portability and extremely flexible configuration. Frameworks that simplify this process are still going to be difficult to use, but are less difficult and more reliable than doing all of that work from scratch.
I would be dubious of using an enterprise framework in a 'normal' project though, as it is most likely extremely overengineered for non-enterprise requirements and could end up being more difficult than coding from scratch in that circumstance.
It provides an IoC container. Yes, using that to its full requires reading quite a lot. The same is true of almost any powerful tool. If you're going to use LINQ, that needs some study too - does that make LINQ useless in your view?
It provides useful utility classes for various things. Often these are things you might roll yourself in other circumstances.
Now, as for why you're getting mysterious stack trace errors when compiling a project which uses Spring.NET... that sounds very odd. We'd need to hear more about the errors to know what's going on.
If you don't understand, you might ought not use spring.....
But Spring.NET is a good framework. It is more than IoC, alot more....
If you don't understand dependency injection/IOC or Aspect Oriented Concepts, spring may not do too much for you and you might as well stick to service locator type things and explicit try/catch blocks all over your code....
I agree with you that it has some learning curve, but that alone should not discourage anybody from learning this really awesome tool.