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. Incivility is not tolerated, such comments are deleted.

 

I'm the co-author of TimeSnapper, 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

I wrote this, and use it every day for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. You should use NimbleText, you handsome devil!

 

Articles

The Canine Pyramid The Canine Pyramid
Humans: A Tragedy. Humans: A Tragedy.
ACK! ACK!
OfficeQuest... Gamification for the Office Suite OfficeQuest... Gamification for the Office Suite
New product launch: NimbleSET New product launch: NimbleSET
Programming The Robot from Diary of a Wimpy Kid Programming The Robot from Diary of a Wimpy Kid
Happy new year 2014 Happy new year 2014
Downtime as a service Downtime as a service
The Shape of Your Irrationality The Shape of Your Irrationality
This is why I don't go to nice restaurants any more. This is why I don't go to nice restaurants any more.
A flowchart of what programmers do at work all day A flowchart of what programmers do at work all day
The Telepresent Man. The Telepresent Man.
Interview with an Ex-Microsoftie. Interview with an Ex-Microsoftie.
CRUMBS! Commandline navigation tool for Powershell CRUMBS! Commandline navigation tool for Powershell
Little tool for making Amazon affiliate links Little tool for making Amazon affiliate links
Extracting a Trello board as markdown Extracting a Trello board as markdown
hgs: Manage Lots of Mercurial Projects Simultaneously hgs: Manage Lots of Mercurial Projects Simultaneously
You Must Get It! You Must Get It!
AddDays: A Very Simple Date Calculator AddDays: A Very Simple Date Calculator
Google caught in a lie. Google caught in a lie.
NimbleText 2.0: More Than Twice The Price! NimbleText 2.0: More Than Twice The Price!
A Computer Simulation of Creative Work, or 'How To Get Nothing Done' A Computer Simulation of Creative Work, or 'How To Get Nothing Done'
NimbleText 1.9 -- BoomTown! NimbleText 1.9 -- BoomTown!
Line Endings. Line Endings.
**This** is how you pivot **This** is how you pivot
Art of the command-line helper Art of the command-line helper
Go and read a book. Go and read a book.
Slurp up mega-traffic by writing scalable, timeless search-bait Slurp up mega-traffic by writing scalable, timeless search-bait
Do *NOT* try this Hacking Script at home Do *NOT* try this Hacking Script at home
The 'Should I automate it?' Calculator The 'Should I automate it?' Calculator

Archives Complete secretGeek Archives

TimeSnapper -- Automated Screenshot Journal TimeSnapper: automatic screenshot journal

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
OJ Reeves
Eric Sink

InfoText - amazing search for SharePoint
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
Aussie Bushwalking
BrisParks :: best parks for kids in brisbane
PhysioTec, Brisbane Specialist Physiotherapy & Pilates
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

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