Social Links
Twitter

Entries in DotNet (96)

Tuesday
Mar162010

Install it and Love it!

Before I get going on my Framework Series, I needed to have a way for people to get the code, branch it, play with it and fork it in way I don't expect them to.

I mean, this is THE WHOLE POINT OF MEF, extend in ways in which you cannot predict when you initially design your App.

I have been using Subversion for years and know for a fact (from multiple personal experiences) that branching and merging can cause tremendous pain for you. So I did not want to use SVN. This means basically I needed another SCM System.

I see only two viable alternatives, Mercurial (Hg) and Git. Git is cool, but it's also pretty complex and doesn't run very well yet on Windows which is my primary audience, so we are left with Mercurial.

Joel Spolsky says:

Learn Mercurial, trust Mercurial, and figure out how to do things the Mercurial way, and you will move an entire generation ahead in source code control. While your competitors are busy taking a week to resolve all the merge conflicts they got when a vendor updated a library, you’re going to type hg merge and say to yourself, “Oh gosh, that’s cool, it just worked.”

So who am I to argue with that. I'm not, in fact I agree with it whole heartedly.

  1. Get Mercurial Here or Here with Explorer Integration
  2. Learn how to use it Here
  3. and Integrate with Visual Studio using VisualHg Here or using HgSCC Here

The more I work with Mercurial the more I really love it.

I see an Ag Issue Tracker with Hg integration in my future, maybe "Mg" :-)

Wednesday
Feb242010

Design Outside the Box with MEF and Rx

This is probably one of the most important videos I have watched this year.



DICE 2010: "Design Outside the Box" Presentation Videos - G4tv.com




In it Jesse Schell, a professor at Carnegie Mellon University talks about the emerging economy that is coming from Gaming.



Facebook game companies (Farmville) sell for $350 Million Dollars, WiiFit made $1 Billion Dollars… Seriously?  Yes, Seriously.



So what does that mean should I just start writing Games?  Well you could, but the real take-away for me was that technologies by nature DIVERGE.  There has been so much prediction about convergence over my career one thing I can assure you of, it will never, ever happen, at least not in a free market economy.



This means that I need to be prepared in whatever software I am writing to be able to adapt quickly to both changing needs and changing systems.



Technologies such as MEF – “Managed Extensibility Framework” and Reactive Extensions for .Net (Rx) are going to become ESSENTIAL tools in your toolbox.



Why MEF?  because we are going to need to extend apps without completely rewriting things, share lots of components between apps and add new functionality on the fly… MEF not only enables this, it makes it so you can create a completely composable application built from a bunch of independent parts.  3rd parties can use our Contracts and add functionality too.  This is going to be extremely important in the very near future.  We’ve been headed down this path for a long time, composability is what makes it now even more compelling.



Why Reactive?  Because our software is really going to really start living in a push based ecosystem… grab data from a source somewhere out in the ether and do something with it when I get it.  Rx makes coding this much easier than trying to manage it with a pull based Enumerable mentality.



Pull based stuff is great when you have a few components and know when you need to grab data, but what if you don’t know, or don’t care when and if you receive it… Reactive makes this style easier to manage.



If you aren’t building all your new Applications as Composable Components, then you are shooting yourself in the foot.  It doesn’t matter if they are Web Apps, Silverlight or WPF, they should all still be components so you can manage, test, extend or replace them much easier than trying to complete a working system that is even loosley coupled with IoC.



Composability is key.  “Composable Parts export services that other Composable Parts need, and import services from other Composable Parts… Composable Parts are either added to the container explicitly or created through the use of catalogs.”



This lets us create a shell and just start adding things to it, some will be complex things, what does the thing do? The shell doesn’t care, it just creates one and makes it available.  How does it interact with another thing?  Reactive makes this easier to manage through some Contracts coupled with MEF to compose them.



The Video above talks mostly about how gaming is going to pervade many things; essentially what it is really saying is that all these little composable parts are going to be interacting with each other.  Your apps need to be prepared for that, How?  MEF and Rx!



Learn them, Love them, Give feedback, because you are probably going to be using them constantly (or wish you had) from now on.



I am starting a series of posts based on exactly this, how is this new architecture going to work?  How do I build Real-world Apps with it?  Precisely what I am going to be covering as I go from the ground up to put the puzzle pieces together.

Friday
Jun062008

Silverlight 2 Beta 2 Downloads available

Still no sign of Blend 2.5 June CTP yet, will post as soon as I find it.



Jeesh! I don’t know why they seem to make this stuff so hard to find. Here they are, more later:

Silverlight 2 Beta 2 Download (4.66 MB)

Silverlight 2 Beta 2 Documentation (50.3 MB)

Have fun!



Peter Bromberg's UnBlog: Silverlight 2 Beta 2 Downloads


 


Note: from the Silverlight Forums -



The reason the links were not publicly announced is that everything is still being tested.  Part of that testing includes actual customer deployment scenarios from live servers, so the links are up but not made public before we're actually done.  We did find a couple problems during this phase, and recommend that you do NOT install until we actually announce the release.  VS Tools and Blend will be available at that time.


To address upgrade questions already appearing in this thread: updating the runtime and VS Tools will not require an uninstall.  For Blend, I'm not certain, but installing VS Tools Beta 2 will uninstall the Blend March (Beta 1) preview.  The Beta 2 runtime will not be able to run Beta 1 apps due to various breaking changes during this cycle.  All the details will be available when we release.


So be patient... they are all coming today.


As they become available, I will append the links here, when they are ALL available nd I have an Install Order I will make a new entry that covers it all.



Silverlight 2 Beta 2 Runtime:   http://go2.microsoft.com/fwlink/?LinkID=115261


Silverlight 2 Beta 2 Documentation:     http://www.microsoft.com/downloads/info.aspx?na=22&p=17&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3dbce7684a-507b-4fc6-bc99-6933cd690cab%26DisplayLang%3den


Silverlight Tools Beta 2:   http://www.microsoft.com/downloads/details.aspx?FamilyID=50a9ec01-267b-4521-b7d7-c0dba8866434&DisplayLang=en
(this is silverlight_chainer which includes the SDK)


Silverlight 2 SDK Beta 2:  http://www.microsoft.com/downloads/details.aspx?FamilyID=ba7b510d-0646-4d06-9834-cb82d669872a&DisplayLang=en


Expression Blend 2.5:   http://www.microsoft.com/downloads/details.aspx?familyid=32A3E916-E681-4955-BC9F-CFBA49273C7C&displaylang=en


Deep Zoom Composer 0.9.0.3:   http://www.microsoft.com/downloads/details.aspx?FamilyID=457b17b7-52bf-4bda-87a3-fa8a4673f8bf&DisplayLang=en


All these are now working, so we are “Off to the Races“


Go Forth and build something COOL! 


 


UPDATE:


All of the above with instructions are available at: http://silverlight.net/GetStarted/


I had an error when I first intalled the Chainer, this is one set of solutions:


http://weblogs.asp.net/bradleyb/archive/2008/06/06/upgrading-to-silverlight-beta-2-and-visual-studio-2008-sp1-beta.aspx


 

Monday
Jun022008

We don't need no stinkin' DBAs...

This is precisely why I think that we need EntityDB. DBA's are great when you have the luxury of hiring one (or having one on staff).  MicroISVs and Small companies with a need for custom software do not always have this luxury, nor the insight to hire one.  In today's world of Code Generation, Metadata and an awesome pool of brain's at Microsoft - this can all be automated by some the best in the business.  Linq Plumbing should not be rocket science, it should be straight-forward and simple to understand.  I should not have to have a DBA to write a decent scalable model when the Object Model can generate a proper Database and communication layer all by itself.  I say it CAN, it just doesn't because there is not yet enough screaming for it.  So in the meantime, I will just keep screaming a little louder each day.



For example, one commercially available survey software that I won't name here, had code in it that retrieved of tens of thousands of rows from the database only to filter them out in a for/each loop in C#.

Needless to say, that ended up being a big bottleneck in terms of CPU use and network bandwidth.

The sales rep swore up and down about the scalability of the solution, when, in reality, it didn't take much traffic to bring the data center to its knees.

The moral of the story: trust your developers to write code, not manage huge amounts of data.

Depending on your developers, you may want to be careful about how much to trust them with the data.

Experienced DBAs can be a real pain to work with and that's what makes them great.

They demand referential integrity and schemas and won't let you make one little change to the schema to simplify what code you have to write.



Andy Leonard on Twitter's Woes

Tuesday
May202008

Visual Designers that Don't Scale

Yesterday Scott at OdeToCode talked about some good insights about the visualizers in VS08.

Visual Designers Don’t Scale
K. Scott Allen - 5/19/2008 9:32 PM PST

Visual tools that fall into the second category have to cover a wide range of scenarios, and they need to scale. I stumbled across an 8-year-old technical report today entitled "Visual Scalability". The report defines visual scalability as the "capability of visualization tools to display large data sets". Although this report has demographics data in mind, you can also think of large data sets as databases with a large number of tables, or libraries with a large number of classes - these are the datasets that Visual Studio works with, and as the datasets grow, the tools fall down.

Maybe they can add some of DeepZoom's technology here but I am not sure how that could be accomplished easily, Breaking up the Image is the most likely way to accomplish it, create related sections of your Schema in different diagrams, at least that is how I have been working around it in even my smaller applications.  But this of course doesn't really help when you are looking at the BIG picture :-)

Tuesday
May202008

EntityDB: The next great Microsoft tool (if they would just make it)

Reading in the Industry blogs, official samples and documentation provided with MS SQL Server 2005+, Visual Studio 2008 and Linq to Sql and the Entity Framework, you will get the impression that we have a tremendous ability to efficiently decipher how to interact with a Database.  Additionally, Industry leaders have led us down a path of Code Generators, Designers and the separation of UI Design from functional Object code; read "Astoria" and/or "MVC" here...


Didn't CASE do this sort of thing for us years ago?  Didn't it also fail?  There is huge amount of traffic about the topic of "Falling down when you hit a threshold" and insistence that all things should be built ultra-scalable.  OK, that's great if you love to write plumbing.  I for one, don't. What if that could be done for you, with the most efficient options always at your disposal; of course with the opportunity to tweak and extend to meet a specific need.


While there are many great arguments to be had over what is exactly ultra-efficient and those who think they have a better method must be able to override and extend the selected generation of code that is offered by not only being able to write that code, but also to inject it into the Generated Code (or at the least allowed to edit the templates) produced by Visual Studio.


If you don't already know why this is so important, we need to first look at the massive shift in Business Software Development and where we are going to be running most business applications.  We used to run all our apps on our own hardware, inside our own network and everything was under our tight control.  While this model still applies to much corporate development, I believe it will become less and less used as a cost effective alternative to a HOSTED solution.  Pricing of hosted solutions have plummeted in recent years, in fact I am almost willing to bet that the cost of electricity alone using hardware just a few years old would cover the cost of a hosted solution.  And what happens when I DO need to scale, How do I add 20 servers to the Web Farm overnight?  Staffing requirements and maintenance of hardware start to become totally offset when we look at this model. I CANNOT BUILD A SERVER CHEAPER THAN I CAN HOST ONE!  That is the real bottom line.


I would wager that MOST applications would run just fine on a hosted solution with one machine doing all the work, at least in the beginning, or at least with a hoster that gives you Web on one machine and your DB on another.  Are we talking about every solution here?  No, but I think we are talking about a gigantic sector of the market that is currently all but ignored by the provided tools we have at our disposal.


Don't get me wrong here, we have GREAT tools available and more coming, do they target what is really needed?


First lets look at the three new primary tools given to us by Microsoft.  WCF, Linq to Sql and the Entity Framework.  WCF provides a great pipeline to pass data between our UI, Business Objects and Database, but it just plumbing.  Linq to Sql and EF provide a great way to interact with a Database IF and ONLY If you have a proper database in place first.


What does this mean to most data-driven development projects?  It means they either need a DBA, or they need to hire one for the portion of the application that defines the database.  This is one reason Migrations for Ruby on Rails has gained so much popularity, it hides this chore.  Most of us don't care about the DB, it's just a place that holds data.  Some of you can go on and on all day about the subtleties of databases but that is completely outside the scope of what I am talking about here. Not only will Migrations create a DB and Schema around what your App needs, it will also keep it up to date with changes made by any developer that can be easily stored in Version Control software like SVN or TFS.


This is what the Designers for Linq to Sql and/or Entity Framework need to do for us.  I really don't mind changing my Linq to SQL Apps over to Entity Framework if it will allow us to focus on one great technology.  It's great that they can operate against a currently created database, but they should also create one (IN AN OPTIMIZED WAY) when one does not exist.  It should create Stored Procedures if I tell it to... Even if we are migrating a legacy application, I would still like to see what a tool spits out for me.  I just might use the new techniques.  There are tons of ways to move data from one schema to another, again, outside the scope of this article.  So back to the scope...  EF Does a great job of creating an interaction between Database and Business Objects, but it doesn't help us rapidly create a NEW model without an existing database and I think this is important in two ways, first and foremost, I don't want to write any plumbing code to do this.  The tools are smart enough already to do almost all the work for us, it can go just a little bit further and create the expected interaction that solves most of the interaction of the database work for us.  I can create a Model with the EF Designer by adding Properties and Associations, but it won't go and create a database around that model.


I should not have to know about how the interaction happens, just that it does and that it does so in a fairly efficient manner.  If I lose a certain percentage of performance due to layers, then so be it if I can create my application 10 times faster.  If the tool developers choose to implement change tracking in a DataContext or Object Context that is great, do so in a way that makes sense for the CODE developers to use, not require me to go hire Database professionals to argue about the proper plumbing or storage techniques.  Linq ALREADY knows how to create efficient SQL, if it did so in code generation vs. dynamically at runtime who cares?


We can host a solution out in the cloud so should we need to be worried about the optimization of how our application persists its data?  Certainly there is is need to cover legacy applications and all the DBAs running around out there, that is well covered right now.  What we seem to be missing is the ability for competent application developers to create Rich Internet Applications (read Silverlight and Ajax) and have the data persisted without a bunch of plumbing and tweaking.


What is NOT covered is the ability to rapidly envision, design, develop and deploy solutions destined to live on a Hosted Solution -- even if it is "hosted" internally.  This solution will most likely have a distinct separation between UI, Business Objects and Database, but do I really need to see those distinctions in my code?  Not really.  Do I really need to spend the time to wire up all the Databinding when the MetaData already knows what I need to do?  No Way, a tool can create that for us.  It can already look into our metadata and see what we need to do to hook up a DataGridView to a table.


I would venture to say that the tools are already here, they just don't work the way we need them to so we can build these applications quickly.  I spend MOST of my time Creating a Database, then working on plumbing and interactions between the Database and the UI, I should not have to do this any more.  Microsoft did a fabulous job of giving us a database that can scale with us as our application grows.  We have SQL CE, SQL Server Express and SQL Server Enterprise to grow with us, we can use SQL CE for Mobile Apps and offline stuff, wouldn't it be wonderful if I did not have to architect that portion of the solution any more?  I am talking about the people who do not have the luxury of a full time DBA.


Of course, the solution is there, staring us right in the face, the answer is the Designer for Entity Framework.  If this Designer could be used to build out the Database, and track the Schema changes, then it would take down part of the battle, just a little more work and it could completely remove the NEED (we should always have the option to extend and modify though) for us to write anything between the Business Objects and the Database.


We should not need to write Serializers for Silverlight, WCF or anything else, the tools already KNOW how to do that, they just don't.  The MetaData is there, let's use it.  Rob Conery's Subsonic and ActiveRecord shows there is interest in such a tool, but I say this tool needs to come from Microsoft and it needs to be built into the current generation of tools we are using or are being pushed to use (aka Linq).  With Rob and Phil working AT Microsoft why can't they contribute some of that knowledge over to the ADO team and get this into the EF Tools we need.  Pablo, Mike, Dinesh and the rest of the ADO Team are doing a great job so far, but they are only touching on what we really need.  The newest version of EF finally gets a way to do disconnected graphs which is a step towards the goal thanks to Danny Simmons.


These tools need to work seamlessly with Linq and allow me as a developer to write applications with little or no concern for how my data is persisting.  I want to create Controls that I can offer to my UI which work seamlessly with Ajax or Silverlight and not require me to write a ton of plumbing just to move things back and forth from one layer to another.


This is the challenge for the new world of development.  We have already moved to a hosted world and our tools need to move there with us. But what do I know, I am a VB developer first and foremost... This is what I know, my customers are asking me to create these applications and to create them really fast.  I can choose to use the tools I know best or I can branch out and find something new.  The problem here is that I have already invested years of time to learn the tools I am using and they are simply not doing what I need them to do to make my job truly easier. 


My Invoice Object doesn't really need to know what DataContext my Customer Object lives in and I as a developer should not have to be concerned about that in the slightest.  I should be able to freely take a Customer I loaded from Invoice "A" and assign it to be used for Invoice "B" without worrying what context it came from, Invoice "B" just needs to know its a valid Customer or that it is a new one I just created without me forcing something into the plumbing to test it.  It should know how to roll itself back when I cancel changes, etc.


With Generics and XML Literals, VB is a Top Notch Code Generator.  Kathleen has proven that here and Karl talks about Metadata and what we can do with it over here... We don't need Yet Another Code Generator.  We need something that works with the existing modelers and designers and just makes our life as developers easier.  It needs to be INSIDE Visual Studio and we need to be able to work with the templates.  I should not need LLBLGen or MyGeneration or CodeSmith or SubSonic to do something Visual Studio pretty much already knows HOW to do, it just doesn't.  I don't need another designer that works with an existing database, I need the CURRENT Designers to Make the Database AND the plumbing.


I personally think this should be the direction for the next revision of Visual Basic.  VB IS the glue that puts the framework together, sure you could also do it in C# (if they added XML Literals...) but VB is already geared for it so why not enhance it's productivity even further by giving us a way to be far more productive than we are today.  This does not require any great shift in the tools we already have, it just requires Microsoft to use them smarter and provide us the keys we need to open the door.

Monday
Apr212008

Mole For Visual Studio - Visualize All Project Types.

I was introduced to Mole at the MVP Summit... this is the most useful visualizer for Visual Studio I have seen to date.

What is Mole?

Mole is a Visual Studio visualizer. Visualizers have been part of Visual Studio since version 2005. During debugging sessions, visualizers allow developers to view objects and data using a customized interface. Visual Studio ships with several simple but useful visualizers. Many developers have posted visualizers for .NET classes.

Mole was designed to not only allow the developer to view objects or data, but to also allow the developer to drill into properties of those objects and then edit them. Mole allows unlimited drilling into objects and sub-objects. When Mole finds an IEnumerable object, the data can be viewed in a DataGridView or in the properties grid. Mole easily handles collections that contain multiple types of data. Mole also allows the developer to view non-public fields of all these same objects. You can learn a lot about the .NET Framework by drilling around your application's data.

Depending on the type of object you are visualizing you can view properties, fields, IEnumerable collection data, an image of the data/control, and run-time XAML.

Mole v4 allows editing of properties. Click the link below to get it.

Mole For Visual Studio - With Editing - Visualize All Project Types.

Wednesday
Mar052008

Why do installers need to be painful

When installing Silverlight 2.0 beta 1 I encountered the following error:



An Error Has Occurred:
Silverlight Tools cannot be installed because one or more of the following conditions is true:

1. Visual Studio 2008 RTM is not installed.
2. The Web Authoring feature of Visual Studio is not installed.
3. A previous version of the Silverlight Runtime is installed.
4. A previous version of the Silverlight SDK is installed.
5. The Visual Studio Update KB949325 is installed.
6. A previous version of Silverlight Tools is installed.

To continue, please install or uninstall the appropriate products and run this installer again.


First of all... This is ridiculous, the installer knows EXACTLY what is missing... so what is it?  Why do I need to hunt down one of 6 possible problems?  Just tell me EXACTLY what is wrong, or better yet, FIX IT!  If I need to uninstall something, then DO IT, obviously that is what I WANT to do to make this work.  If I need to Install something, then go get it and install it (unless of course it is VS08 which would make me a complete idiot for trying to install this without that)  or point to the Trial Version with a darned link already.


I know that VS08  and the Web Authoring feature are installed...
I already uninstalled the previous Silverlight stuff I have...
I looked in Installed Updates and don't see the referenced KB Update...
I already uninstalled the previous SDK Tools and Rebooted...


So, this "error" is of course, NO HELP.


If companies want to make tools and have them get widespread adoption, then they need to be smart and helpful, not say:



Uhhhh, something bad happened and I can't help you, later dude.


So, where is the log of the installer so I can manually go track down an error that the installer should be intelligently informing me about...


UPDATE:


Apparently the Registry Entry “HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\ToolboxPages\Silverlight Components” must not exist or the installer fails.  After simply removing this entry, the install worked without a hitch.  This must not get removed correctly by some versions of the Silverlight Tools.


More information for resolving problems can be found here.


 

Wednesday
Jan232008

Scott Guthrie is coming back to Scottsdale - March 11th

AZGroups is pleased to announce of a visit to our valley of the sun of
Microsoft software development visionary Scott Guthrie. Our fifth annual
Arizona .NET User Group (100% free) event brings you a chance to spend some
time with an original inventor and creator ASP.NET. Scott has been busy
since ASP.Net was first launched and now presides over product development
efforts for Visual Studio, Silverlight, ASP.NET, IIS and Expression Tools.
If you have used these tools you have Scott Guthrie to thank. Many
developers, however, see beyond Scott's formidable product manager status,
and find a cut-to-chase, blog-friendly mentor helping to improve they way we
work and utilize Microsoft developer tools. Don't miss this opportunity to
experience one of the brightest and most down-to-earth technologists Redmond
has to offer.

See you there!

Scott's events in the past have always been the most informative, worthwhile events I have attended in Phoenix.  If you are a Developer, Designer, Architect, or Project Manager this is a MUST ATTEND event.

Sunday
Dec022007

Xbox Team : December 2007 System Update


December 2007 System Update



Hello Everyone!

Coming shortly is our December 2007 System Update, one where we've added a lot of new features that you guys have been asking for. You should be prompted for the update early next week on December 4th.


Xbox Team : December 2007 System Update


This is not only the most exciting update I've seen to the Xbox 360, it is also the most compelling reason for me to go out and buy another one!


An Xbox lives in many rooms in my house right now, there are only 2 things I still want now that we FINALLY have Divx support.



  1. I want XNA Support for VB!!!
  2. We need Silverlight 2.0 Support

I know for a fact that some Silverlight support has at least been demoed for the Xbox but I don't believe this was running on an Xbox.


VB Developers should be allowed to be XNA Developers!  This stems from there not being a build of the VB Runtime yet for the Xbox.  Hopefully this will be cleared up soon, there is some talk about the VB Runtime not being required any more in VB.Next but nothing firm.  I'd much rather see a port of the runtime to work on the Xbox so we can just start writing games in VB Now.  There were a ton of great PC Games written in VB3 and up, it only makes sense that many of those developers would love to be writing titles for the Xbox.


With support for Silverlight, we could have awesome media library connections and Home Server applications that would be displayed on our main Entertainment / Living Room system.  I'm hoping both those updates roll out soon and I will then commit all my entertainment type development to the Xbox.


I really look forward to testing out the Divx update on Tuesday and if it works as expected, I will finally be building my Library system with the Xbox in mind.