Categories
Posts

The CSLA of the Maltese Falcon

She sat down in my office, batting those beautiful blue eyes behind little girl glasses.Her only makeup seemed to be a bit of lip gloss that made her thin expressive lipsshine as if moist and waiting. “Rockford Lhotka isdead, and I need you to find out who killed him!” she said, a bit breathlessly, fingeringthe Microsoft logo on the form-hugging knit polo shirt she wore over her waifish figure.Her mousy hair and shy expression made clear she was the geek girl they’d all havea crush on, come the next product launch. I took the case, accepting a free copy ofVista Ultimate as a retainer.

My old buddy Lt. Hamilton, down at the eastern precinct was no help at all. He toldme that Rocky Lhotka, wrote the code and the documentation for CSLA. “What’s CLSA?”I asked.  “The primary goal of CSLA.NET is to enable you to build a rich, powerful, and flexible business layer foryour application.” Man. The L.T. can be a dick when he’s hung over. Talk English man!I took off, rather than listen to more marketing-speak from that hack.

Luckily, Maggie, who works in the stacks down at county record-keeping knew more.“What does CSLA .NET do? What doesn’t it do, honey.”

“Make it simple for me?” I asked.

“Pay attention, and I’ll boil it down: CSLA Data Binds beautifully!I’ve worked with all sorts of objects that I could supposedly bind to my .NET userinterfaces. nHibernate objects. Castle ActiveRecord objects.Generic Lists of things. On and on. What did I get? Bugs and wonky stuff that didn’twork. Bind that puppy to a DataTable and you’re listening to big band jazz, but bindto objects and you’re singing the blues. Even the new LinqDataSource only really workswith LINQ to SQL, not the other flavors.”

“So you can’t bind your UI to objects?”

“Try it with a CSLA business object. It’s like butter. These objects work so well,so completely, that you barely need to write any more code”

“But you said it did more than that?”

“Once you have that foundation, all of the other magic that the framework does isjust icing on the cake. Thick layers of fabulous icing. The fabulous business objectsthat link automatically with your UI layer also have built-in facilities for datavalidation, authorization, and permissions. There’s a whole stack of automatic undo functionalitythat you can have almost for free.”

“Wow. That’s something. You want a drink?”

“On top of all that, is an Active Record pattern implementation and ‘data portal’which allow you to use almost any remoting technology to link between applicationlayers. The code that runs on the server and that which runs on the client is exactlythe same. Your objects move magically from one to the other. Ol’ Mr. Lhotka calledthese ‘mobile objects.’”

“Seriously. I need to go and get a beer. Maybe read the sports section.”

“Coming in the next version are better LINQ query support, data access layer standardizationwith externalized object factories, and async data access. Also coming is CSLA Light,which provides mobile objects to your Silverlight Apps. I’m excited to start playingwith these feature…we’re just waiting for the manual.”

And the light dawned. Rocky hadn’t finished the manual. A tell-all confessional likethat could keep people from buying MSDN magazine and certification manuals for months!The mousy little booth babe had killed poor Rocky, and then had the nerve to hireme to find the killer! I ran out of County Records, raced round the corner, and Iheard thunder. Light flashed behind my eyes. My knees buckled. What a sap I was!

Tune in next week when you’ll hear Rocky say, “That wasn’t me, I used a mocking framework.”

Categories
Posts

Two Factor Authentication with your Cellular Phone

The whole two-factor authentication system is a fantastic idea. However the idea ofgiving a new device to every person who needs to login to my site? Well, that justseems expensive. And given the fact that I’ve thrown out all of my grocery membershipcards and refuse to shop at those places because it makes my wallet too heavy…Idoubt that people really want to carry that stuff around.

The solution? Use the device we all have with us: our cellular phone. PhoneFactor hasa platform that does just that. It’s also free to use for an application of your choice.You can set it up for RDP, VPN, or program your web app against it. When your userslog in, they get a call on their cell phone and have to press #. If you want to tryit out without setting anything up, try getting a free MyOpenId andusing PhoneFactor as your authentication mechanism.

Personally, I still think the barrier to entry is too high, what with configurationand licensing and user training and edge cases where it doesn’t work…but hopefullygood technology options like this will push out the absurd technology options likeRSA keys and press the pricing down to the point where it really is everywhere andeveryone accessable. Then if we could just get Microsoft and Apple to build it intothe OS so that we really can authorize everywhere using easy tools from any provider.

Categories
Posts

Installing Visual Studio 2005 on Vista 64

Wouldn’t you know it? I have my shiny new Vista machine all built and hopping alonghappily, and I need to do a quick recompile of one of my old VS2005 projects. Luckilymy 2005 disc is right here. This should be easy, right?

Things you’ll need:

  1. Visual Studio 2005 install media and key.
  2. 30g powdered aluminum.
  3. VisualStudio Team Sweet 2005 SP1 (KB 928957). You might think you need an x64 versionof this…but you don’t so don’t worry about it.
  4. 80g iron oxide powder.
  5. VisualStudio 2005 SP1 Update for Windows Vista (KB 929470). Again you only need thex86 version.
  6. A length of magnesium ribbon.
  7. A brazing torch or other high-heat fire producer.

The process:

  1. Insert the VS2005 disc, and start up the setup. Enter your keys and the like. Getthe thing started.
  2. This is going to take a while, so if you haven’t gotten the other ingredients listed,now’s the time to get on eBay and order some up.
  3. At certain points during the install, Vista and the setup will complain that it’snot compatible with Vista and ask you to confirm that you should run certain command.Go ahead and accept/allow all those warnings.
  4. Run the installation to completion.
  5. Execute the Visual Studio SP1 installer.
  6. By this time, the packages will have arrived from eBay, unless you used UPS, in whichcase, there will be a sticker on your door and the packages will be available until1pm at the local depot. Go pick them up.
  7. When you get back the installer should be done.
  8. Run the Update for Vista.
  9. While this is working, mix the aluminum with the iron oxide. They aren’t reactiveat room temperatures, so you really don’t need any special apparatus, but I alwaysrecommend using a filter mask and eye protection when working with powdered chemicals.The mix is unbalanced by weight, but should be about even by volume. Mix them togetherin a bowl or styrofoam cup until very even. If you’d like, you can then mix the resultingmixture 4:1 with playdoh (more thermite than dough) for portability, or just leaveit in the cup.
  10. Once that installer is done, you should be FINALLY able to run Visual Studio.
  11. Place the magnesium ribbon into the cup of thermite, and tape over the top to preventspills. Leave the cup on top of your computer, with the torch handy. I find that havinginstant flaming death hanging over my machine’s head keeps the poor thing in a stateof terror. It prevents so many of those lazy blue screens and has really improvedmy Vista file copy performance. (I think it’s afraid to run that darned search indexernow.)

[youtube http://www.youtube.com/watch?v=62WRdfyzXXc&hl=en&fs=1]

Categories
Posts

Recursive Erudition

Programmingshould be more than just defending the world from aliens, trying to score with hotbabes, and killing all thegrandmothers in the nursing home. Programming, coding, problem solving, creating,and making the world better are all united concepts. When you scratch a place in theground for a plant to grow, or change the pH in your fish tank, or tell your childrenthat cows are called ‘horses’ so that they confuse the other kids in school when theyask for some horse milk with their lunch…when you do those things, you’re programming. Recursive erudition isa log of adventures in understanding what problems can be solved, and what riddlescan be expressed. It exists to teach and, by so doing, to learn. It exists to learnand, by so doing, to teach.

This weblog will contain explanations of how to perform various tasks with code. Iwill discuss design principles, best practices, and those evil little programmingmind viruses that spawn from head to head across the wire like something from a SandraBullock movie. There will be reviews of tools and services that I find useful. I willaggregate the more interesting articles I find around the web and provide links tothe ones I’d like to remember or share, or I may just copy a bunch of links from myRSS feed so that it looks like I’m posting (mock me if I do this). Occasionally, therewill be something funny, newsworthy, or personal…but I share those things elsewhere,so that should be rare. This weblog will mainly contain boring technical readoutsfor my world-demolishing super-weapons.

I expect to receive four benefits from writing and sharing here:

  1. A greater depth of learning: it takes a greater understanding to teach something thanit does to learn it. I will clarify my understanding of what I learn by sharing thetechniques and philosophies from the giant fire hose in my pants called The Internet.(Did you know they make those hoses out of tape? Freaky.)
  2. An opportunity to give back: there are so many folk out there who have helped me learnwhat I know so far. Their efforts have made it easier for me to get started in a demandingfield. I’d like to give something back–and I don’t just mean fart jokes. I doubtwhat I write here will be groundbreaking, or even new. However, so many of the fundamentalshave been covered completely by those who have gone before…and they’ve moved on.A rehash of years-old technology with a viewpoint from the present day may be a worthwhilerefresh of the tutorials that taught me what I know.
  3. A repository of documentation: I’m learning things faster than I can remember them.I need a place to look up the things I’ve learned and accomplished already. I willwake up every morning, like Drew Barrymore, and read my blog. I will find out thatmy parents were really hamsters, and that I married a spatula after 100 dates anda good spanking. But most of all, I won’t forget how to use a regular expression todetect valid email addresses. 
  4. Relaxation: David Allen has taught the worldthat things in your head give you stress. I want to let those nasty little Thetansout of my head. Once it’s written here, I can forget about it in safety. Writing isalso a great creative outlet, and that’s a piece of peace as well.

We’ve almost reached the top of the hour, here, so it’s time for our human interestpiece. Since I’m the only human here, I guess you’ll just have to take an interestin me. My name is Josh Rivers. I’m 35, have been married for just over a year, hopeto have my first son–or at least a lizard–in the next year, and have worked in thecomputer field for more than a decade. Half of my career has been as an independentbusiness owner and contractor. I’ve been coding since I was 10 (if-you-call-writing-password-programs-for-my-computers-using-my-first-name-as-a-password-because-it-was-cool-in-War-Games-to-keep-the-girls-from-getting-into-my-computer-programming),but my real professional focus started about 2 years ago when I started developingweb and Windows Forms applications for my I.T. Services clients. Since then, I’vegone through several memetic confusions of explosive learning, and I’ve got severalmore building on the horizon. There is so much to learn, and I love every moment ofit.

This site was made with dasBlog, ColorScheme Generator 2, and some notes from SteveTrefethen.