Home

Amir Rajan edited this page Apr 29, 2014 · 150 revisions

##What is Oak? Oak brings frictionless development for ASP.NET MVC single page web apps, and brings prototypical and dynamic capabilities C#.

##Oak is Done, Enjoy Oak is Done. The code base is tiny (~5,000 LOC), and developers are very happy using it. It's provided solutions to many pain points with building "single page applications" in ASP.NET MVC and C#. So this section puts a nice little bow on Oak. It's done. Enjoy :-)

PS: there are some devs that are trying Oak on Mono/Postgres. Help out if you'd like! And Oak could always use some more sample apps. If you'd like to contribute, here are some ideas.

###Getting Started Check List

###Want to Use Oak on an Existing Project?

###Contributing to Oak

Oak is open source software released under MIT and would love your help. Here are detailed instructions that will help you contribute to Oak.

###Gemini

Gemini can be used outside of Oak, the nuget package command is: install-package gemini

Gemini is a really important piece of Oak, take a moment to read Gemini First Look. If you have the time and want to really dive in, read Gemini Deep Dive: C# dynamic typing.

###Oak's Entity Model - Cambium

Cambium can be used outside of Oak, the nuget package command is: install-package cambium

####Retrieving and Saving Data Using DynamicDb

DynamicDb gives you instant data access to your database without the need to declare any classes and wire them to an ORM, ie. zero class data access. It will even find table relationships for you.

####Retrieving and Saving Data Using DynamicRepository

DynamicRepository gives you CRUD access to a single table and provides a "place" to add custom retrieval logic.

####Adding Associations Using DynamicModel

DynamicModel's Associations module lets you declare relationships between your objects and the database (this is your dynamic "ORM"). For a better understanding of the term "module", refer to Gemini Deep Dive: C# dynamic typing.

####Adding Validation Using DynamicModel

DynamicModel's Validations module lets you declare validations for your objects. For a better understanding of the term "module", refer to Gemini Deep Dive: C# dynamic typing.

####Change Tracking in DynamicModel

DynamicModel's Changes module lets you track changes to properties of your object. For a better understanding of the term "module", refer to Gemini Deep Dive: C# dynamic typing.

  • HasChanged
  • Original
  • Changes

####Memoize

The Memoize module can be mixed into your classes which gives you method level cacheing of return values. For a better understanding of the term "module", refer to Gemini Deep Dive: C# dynamic typing.

####Strong Parameters, Mass Assignment

Given the dynamic nature of Oak's ModelBinder, it's important to white list parameters if the situation arises.

###Oak's Schema Generation - Seed

Cambium can be used outside of Oak, the nuget package command is: install-package seed

####Creating Schema Using Seed

Seed allows you to quickly generate a database with a simple API.

  • Creating Tables
  • Primary Keys
  • Default Values
  • Nullable
  • Foreign Keys
  • Adding Columns
  • Adhoc Changes
  • Dropping Columns
  • Renaming Columns

####Recommendations for Migrations

Migrating schemas is a tough problem in general. Seed will give you a spring board into schema generation, but you may need more advanced capabilities (which are discussed in the link above).

####Creating Sample Data Using Seed

Seed allows you to quickly generate sample data for testing and creating mockups.

###Supporting Frameworks