-
Notifications
You must be signed in to change notification settings - Fork 7
Home
##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
- Read through Oak's GitHub Page
- Watch the four ~10 minute screencasts on Oak's GitHub page.
- Install the pre-requisites.
- Try out the [interactive tutorial] (http://amirrajan.github.io/Oak/#bootstrapoak).
- Get the Sample Apps up and running. They will give you the lay of the land (refer to Oak's GitHub page for instructions on building the sample apps).
- Skim the wiki topics, they will give you API's and sample usages. There are just a handful of pages, so please take the time to read them :-).
- Let me know what you think
###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.
- Declaration
- Enable Logging
- Inserting a Record
- Updating a Record
- Saving a Record
- Delete
- Intercepting Insert, Update, Save
- Get a Record by Id
- Inspecting Returned Objects
- Get a Single Record by Where Clause
- Retrieving Multiple Records by Where Clause
- Pagination
- Ad Hoc Queries
- Intercepting Retrieval
####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.
- General Usage
- Acceptance
- Confirmation
- Exclusion
- Format
- Inclusion
- Numericality
- Presence
- Uniqueness
- Conditional Validation
- Creating Your Own Validators
####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
- Continuous testing using NSpec
- Continuous deployment using specwatchr
- UI Automation using canopy