DOS on Dope: The last MVC web framework you'll ever need
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

DOS on Dope: The last MVC web framework you'll ever need

When you've done everything you can with Ruby On Rails....

When you've reached the limits of Haskell on a Horse...

If FubuMVC is not for you...

It's time to meet the MVC web framework to end all MVC Web frameworks.

DOS on DOPE is the modern MVC framework built on the awesome power of Batch scripts.

All of the controllers in DoD are batch files.

All of the views are batch files.

The model is based on batch files. The helper functions are... you guessed it! Beautiful batch files!

The complete Source code and tutorials are available at DoD.CodePlex.com

With DosOnDope, it's this simple:

open a cmd window, and write:

dope site Blog

You just built a website, called 'blog'. Here it is:

dod_congrats

Oops. It moves too fast, I can't keep up.

Here's all the folders that have been created for us...

C:\temp\blog>dir /s/a:d/b
C:\temp\blog\Content
C:\temp\blog\Controllers
C:\temp\blog\h
C:\temp\blog\Models
C:\temp\blog\Scripts
C:\temp\blog\Views
C:\temp\blog\Controllers\Home
C:\temp\blog\Views\Shared

And all the files...

C:\temp\blog>dir /s/a:-d/b
C:\temp\blog\Default.aspx
C:\temp\blog\favicon.ico
C:\temp\blog\Global.asax
C:\temp\blog\web.config
C:\temp\blog\Content\Site.css
C:\temp\blog\Content\li.png
C:\temp\blog\Content\Logo.png
C:\temp\blog\Controllers\_actionMissing.bat
C:\temp\blog\Controllers\_controllerMissing.bat
C:\temp\blog\Controllers\Home\Index.bat
C:\temp\blog\h\a.bat
C:\temp\blog\h\h1.bat
C:\temp\blog\h\h2.bat
C:\temp\blog\h\h3.bat
C:\temp\blog\h\p.bat
C:\temp\blog\Models\split.vbs
C:\temp\blog\Views\Shared\_header.bat

Let's create a new controller action, and see how it looks.

dod_about_action

Let's improve the look of that page. You type a little...

dod_about_improved edit

...hit refresh and see what changed.

dod_about_improved view

It worked.

Notice the use of html helper methods like 'p.bat' and use of the partial, '_header.bat' to give styling and a title to the page.

But websites don't live in a vacuum. We need some data to bring this thing to life.

In DoD we embrace the NoSQL movement and jump straight to the data-store of the future: a CSV file.

C:\temp>CD Blog\Models
C:\temp\Blog\Models>copy con Posts.csv
ID`Title`Article
^Z

Posts.csv is both the model that describes our data, and the store which will contain the data itself.

Let's generate actions for administering our Posts:

C:\temp\blog\Models>dope gen Post
Generating actions for MODEL Post in Controller Home...

Check in a browser...

dod_home_adding

The generator has created a nice page for us, with a name and textbox for every field, so we can create new posts.

Once we've added a few articles, let's see what the index looks like:

dod_home_index 2

If we look inside the posts.csv file, we see the data:

C:\temp\blog\Models>type Posts.csv
ID`Title`Article
1`Hello Brazil!`Yes, yes, hello indeed!
2`Let's add a second for good measure`Oh yeah

Frequently Asked Questions

What about security?

If you can't trust public visitors from the internet, who can you trust? Executing user input as commands inside the operating system is the most direct way to get things done, and that's what matters most.

Does it scale?

So far I haven't run into any performance problems. Whenever I've opened up a DoD website to several users, my hard drive tends to get wiped long before I discover performance issues.

Well, that's about it. Source code and tutorials available at DoD.CodePlex.

A full-featured web development framework with the smallest possible concept count.

Feedback welcome.





'Hüseyin' on Mon, 06 Sep 2010 07:36:12 GMT, sez:

That editor with the blue background must be the new TextMate-killer for the PC :)



'Steven Nagy' on Mon, 06 Sep 2010 07:48:02 GMT, sez:

Just when I thought you couldn't stoop any lower..



'lb' on Mon, 06 Sep 2010 08:01:31 GMT, sez:

@Hüseyin -- I really wanted to demonstrate the use of Edlin too, but didn't find an excuse.

@Snagy -- my depths are infinite.



'Liam McLennan' on Mon, 06 Sep 2010 08:03:50 GMT, sez:

I did not realise you had so much spare time. ;)

Porting all of my projects immediately...



'Matt' on Mon, 06 Sep 2010 09:17:25 GMT, sez:

I salute you!



'Martin Mazur' on Mon, 06 Sep 2010 10:31:27 GMT, sez:

I'm speechless!



'Terry Davis' on Mon, 06 Sep 2010 13:19:47 GMT, sez:

Does that come with Windows Vista?
Way cool.



'Terry Davis' on Mon, 06 Sep 2010 13:22:05 GMT, sez:

Department of defense knows it's shit. We gotta befuddle all our enemies.



'Void' on Mon, 06 Sep 2010 14:08:12 GMT, sez:

Wait a second,... that wasn't joke ???



'k3rni' on Mon, 06 Sep 2010 15:41:43 GMT, sez:

Brilliant! Too bad it doesn't run on real DOS with a TCP/IP stack (from Crynwr or whatever). Any plans to do so?



'Eris' on Mon, 06 Sep 2010 15:52:46 GMT, sez:

Wow, I was like, "This is one of the funniest jokes I've seen in this particular niche," and then I was like, "Oh wait this is a thing that exists," and then I was all "Well damn."



'Anil Dash' on Mon, 06 Sep 2010 16:19:18 GMT, sez:

Kept waiting to hear that you "favor convention over config.sys" and was heartbroken to see you omitted that promotion from your product page.



'Armand du Plessis' on Mon, 06 Sep 2010 16:24:37 GMT, sez:

now if this can be ported to mac/*nix my life would be complete



'tunaslut' on Mon, 06 Sep 2010 16:28:04 GMT, sez:

wow...just wow! only question i have is how well does that csv nosql thingy handle sharding?



'Goran' on Mon, 06 Sep 2010 17:20:08 GMT, sez:

As always - I'm left in awe of your kung-fu :)



'Evan Carroll' on Mon, 06 Sep 2010 17:35:57 GMT, sez:

The new shiny Haskell framework is Snap. And, I wonder if this works under wine.



'Ugur' on Mon, 06 Sep 2010 17:42:01 GMT, sez:

awesome (:



'Eddie Jefferson' on Mon, 06 Sep 2010 18:30:27 GMT, sez:

I JUST SHIT MY PANTS AND DONT KNOW WHAT TO DO!!!!!



'Ralf' on Mon, 06 Sep 2010 21:42:53 GMT, sez:

After having learned about Cobol-On-Cogs (http://www.coboloncogs.org/INDEX.HTM) Iwas sure DoD was a joke. But this thing is living, right?

I wounder how long it will take until somebody comes up with an assembler version of a web framework. Webmonics maybe...

You're crazy, dude... ;)



'Joe KLemmer' on Mon, 06 Sep 2010 22:01:24 GMT, sez:

Bravo! Bravo!

This is even better than the http server I ran across many years ago that was written in awk.

If I had the time and energy I'd port this to shell files. But, well, that sounds like work. :-)



'patfla' on Mon, 06 Sep 2010 22:10:50 GMT, sez:

Who says programmers don't have a sense of humor.

And maybe I'll even try it out. Will this allow me to replace Django - and python?

Haskell on a 'Horse'? I'll have to go look that up.



'Richard Quadling' on Mon, 06 Sep 2010 22:15:50 GMT, sez:

"Edlin". I just realised how old I am. Thanks a fucking lot!



'Lit mostki' on Mon, 06 Sep 2010 22:50:46 GMT, sez:

CP/M port please?



'I can fix your joke' on Tue, 07 Sep 2010 02:43:09 GMT, sez:

The "does it scale?" is the punchline and "is it secure?" is the setup, so you need to switch those two to make it funny.



'Joshua K' on Tue, 07 Sep 2010 05:38:13 GMT, sez:

you have inspired me to begin work on SQL on Speed. I like DOS, but I'm no fan of SQL... you are giving DOS a bad rep, and I think we should focus our attention on the guilty party.



'iki' on Tue, 07 Sep 2010 05:50:49 GMT, sez:

Awesome!
Porting to Apache+Dosemu :D



'Chankey' on Tue, 07 Sep 2010 07:21:47 GMT, sez:

Nice :)



'Lck' on Tue, 07 Sep 2010 09:41:09 GMT, sez:

This is awesome! :)



'Daniel Berg' on Tue, 07 Sep 2010 10:55:50 GMT, sez:

Holy. Crap.

It's funny though!



'Maximus' on Tue, 07 Sep 2010 11:44:06 GMT, sez:

Does it come with a TASM compiler for those really complex scripts?



'Marcelo Clerici' on Tue, 07 Sep 2010 14:15:57 GMT, sez:

Wonderful! You are smoking the good one.



'Jerry The old Gray Mare' on Tue, 07 Sep 2010 14:25:05 GMT, sez:

I laughed my ass off, then I opened a command window.....



'Super Jesus' on Tue, 07 Sep 2010 14:36:10 GMT, sez:

"If you can't trust public visitors from the internet, who can you trust?"

Just brilliant. I need to get that tattooed on my cock.



'doowell' on Tue, 07 Sep 2010 15:27:37 GMT, sez:

Outstanding. Can it host Windows?



'Russ' on Tue, 07 Sep 2010 17:01:10 GMT, sez:

I don't like it...no .ini files for configuration



'Fernando' on Tue, 07 Sep 2010 18:19:04 GMT, sez:

Freakin' hilarious. Loving the scalability summary.



'johnnytogo' on Wed, 08 Sep 2010 11:58:40 GMT, sez:

http://www.coboloncogs.org/INDEX.HTM



'Architecture Astronaut' on Wed, 08 Sep 2010 12:54:26 GMT, sez:

You absolutely need to package this for automatic remote installation so that this can be used for building DoD clouds with high ROI!!1



'Aaron M' on Wed, 08 Sep 2010 17:38:01 GMT, sez:

I knew I was missing something with django.. DOS is where the action is



'Johnnytogo' on Wed, 08 Sep 2010 18:03:03 GMT, sez:

http://www.coboloncogs.org/INDEX.HTM



'Anders' on Wed, 08 Sep 2010 20:33:27 GMT, sez:

I'm just... speechless. Friggin awesome, dude!



'renard' on Fri, 10 Sep 2010 16:28:41 GMT, sez:

code as satire, love it



'Nomar' on Mon, 13 Sep 2010 15:17:47 GMT, sez:

Wait, long file names? That's cheating.



'viswanath' on Tue, 14 Sep 2010 11:53:52 GMT, sez:

Hey i'm not able to see output when I'm trying it out on my PC. can any one help me????



'lb' on Tue, 14 Sep 2010 12:10:46 GMT, sez:

@viswanath:

if you're trying it out and failing, give details in the discussion area at codeplex:

http://dod.codeplex.com/discussions

i'll be happy to respond there
lb



'Raj Chaudhuri' on Fri, 17 Sep 2010 16:10:44 GMT, sez:

DUDE!



'jonno' on Tue, 21 Sep 2010 01:04:17 GMT, sez:

I'll see your batchfile banditry and raise you an 8 bit BASIC bonanza :-)

http://lyonlabs.org/commodore/kb-bob/index.html



name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Aim for constructiveness. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Also, I get particularly nasty on comment spam. It's not worth even trying to post comment spam here -- your html is escaped, and your links are given a rel='nofollow'. By attempting to post a comment, you understand that if the comment is considered spam, at my absolute discretion, your IP address may be used as the target of a prolonged distributed denial of service attack. Your electricity might suddenly stop working. Your car tyres will go mysteriously flat. You will suffer permanent hairloss. Your dreams will be filled with terrifying monsters. And in any case I reserve the right to record and publish your IP address.

 

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

Use it for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. Use it right now! Go on! Hurry! Don't walk, run!

 

Articles

Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion
Got CSV in your javascript? Use agnes. Got CSV in your javascript? Use agnes.
I went to write down a book name and founded an internet empire instead. I went to write down a book name and founded an internet empire instead.
NimbleText: Origins NimbleText: Origins
The Windows 8 Mullet The Windows 8 Mullet
Cosby: spontaneous striped background generator Cosby: spontaneous striped background generator
Slides from WDCNZ: Live Coding Asp.net MVC3 Slides from WDCNZ: Live Coding Asp.net MVC3
MVC 3, MVC 3, "Third Times a Charm" references
Custom Errors in ASP.Net MVC: It couldn't be simpler, right? Custom Errors in ASP.Net MVC: It couldn't be simpler, right?
Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold
Anatomy of a Domain Hijacking, part 1 Anatomy of a Domain Hijacking, part 1
secretGeek.net domain has been stolen. The site may go down. secretGeek.net domain has been stolen. The site may go down.
Boring article: 'untrusted domain' issue with SQL Server. Boring article: 'untrusted domain' issue with SQL Server.
Coding While You Commute Coding While You Commute
Test Driven Dentistry Is A Good Thing Test Driven Dentistry Is A Good Thing
The 'less crashy' release of NimbleText The 'less crashy' release of NimbleText
Rethinking Toolbars in Visual Studio (or any IDE) Rethinking Toolbars in Visual Studio (or any IDE)
Where shall we have lunch? Where shall we have lunch?
Setting up email for your microIsv Setting up email for your microIsv
The NO Visual Studio movement: Compiling .net projects in Notepad++ The NO Visual Studio movement: Compiling .net projects in Notepad++
ZeroOne: the editor for programmers who think in binary ZeroOne: the editor for programmers who think in binary
Mercurial workflow for personal projects (with a .net bias) Mercurial workflow for personal projects (with a .net bias)
I see you're using vim. Let me fix that for you. I see you're using vim. Let me fix that for you.
The worst recruitment spam I've ever read The worst recruitment spam I've ever read
A thank you I forgot to say A thank you I forgot to say
My new product, NimbleText, is live My new product, NimbleText, is live
Grabbing the free songs of Jonathan Coulton (with Powershell) Grabbing the free songs of Jonathan Coulton (with Powershell)
Using NimbleSet to compare lists Using NimbleSet to compare lists
Wanted: Wiki Lists (dot org) Wanted: Wiki Lists (dot org)
DOS on Dope: The last MVC web framework you'll ever need DOS on Dope: The last MVC web framework you'll ever need
JSON Query Languages: 5 special purpose editors JSON Query Languages: 5 special purpose editors
What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

NimbleText -- World's Simplest Code GeneratorNimbleText -- World's Simplest Code Generator, Text Manipulator, Data Extractor

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
Thomas White
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy