Git Product home page Git Product logo

butler's Introduction

#Butler - World Developer Class CMS Butler won't get in your way. Build your site as you want to, then add Butler as a drop-in Backend for your models.

Word of warning; Butler is in Alpha2, fully working, but primitive. Works on my machine guarantee issued :)

What is Butler?

Butler is a pluginnable backend for your MVC4 site. After installing the Nuget Package, an area will be added at yourapp.com/Butler/ where you and your users can login, and create/edit/store models for your application. You can then retrieve the model and present it as you wish inside your views. ###Install-Package Butler #######What you get:

  • User system, you can use it to authorize your own controllers too!
  • A portal that gives you creation/editing capabilities
  • A File Database

No bullshit

Butler won't get in your way. Create your site, then add Butler to enable content editing. You don't have to create templates or setup page structures.

Get started

Get up and running in 5 minutes.

Install Butler Nuget Package

Install-Package Butler

Edit Global.asax

Edit your global.asax to enable Butlers routes to work. ControllerBuilder.Current.SetControllerFactory(new ButlerWeb.Areas.Butler.Controllers.ControllerFactory());

Create a Model

Now, just create a Model that can store the information you want. Here is an example:

namespace MyMvcApplication.Models {
	public class MyEditablePageInfo : ButlerCore.ButlerDocument {
		public string Title { get; set; }
		public string Summary { get; set; }
		public string Content { get; set; }
		public string AnyOtherText { get; set; }
	}
}

Butler works with the models in your application, it will look for them in YourApplication.Models, this is everything you need to do in order to have the backend allow you to create and store that model.

Create content

Start your application, Head over to /Butler. Create a new MyEditablePageInfo. Butler will force you to enter an ID for this perticular MyEditablePageInfo. This ID will be used when fetching the data for presentation later.

Fetch your Model in your Controller/view

Now when you have stored data, you need to retrieve it in order to show it. This can be done in your controller (it can be done everywhere).

var info = ButlerCore.Store.Get<MyMvcApplication.Models.MyEditablePageInfo>("TheIDYouSpecifiedEarlier");
ViewBag.MyInfo = info;
ViewBag.Title = info.Name;

Done!

Contact me (@bigCheeseAnders) if you have any questions, feedback or anything else to discuss. I'd be happy to help you! Have a great day.

butler's People

Contributors

abergs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

butler's Issues

Solve dynamic DB-context

We need to have a context / repository that is generic / dynamic.

We need to be able to add a extended Unit model and have it readable by our API.

Tags property on ButlerEntity

So that we can have a BackendUI that can show all Entities that belongs to a Tag. That way we could group different entities together for easy navigation/viewing in backend editor

New Baseclass, ButlerEntity

Should have following properties:

  • ID, string
  • Tags, List
  • abstract StorageEngine

In the future, this class could be used to add authorization to content changes by e.g.

  • Roles, List
    so that we can match against Current.Identity.Roles

Create Store Interface

All stores should implement a IStorageEngine so that we can replace the actual storage without changing anything else.

We should be able to switch to a faster store, perhaps SQL or Nosql instead of pure file IO if we want to have better performance finding things depending on properies.

If we only offer FileStorage advanced selects will be slow. One way to perform it with Files is to load all files and then parse the models in memory. Will not be fast for large collections.

ButlerEntity - Auto Generated ID

When we have APi's to fetch entities depending on properties / type (instead of ID), we should be able to auto generate ID's since they are perhaps not specified by the developer when feching data.

A Guid.ToString() should suffice.

New Baseclass, Multilingual

Will store the same document but in multiple languages. Could offer automatic translation from BING/Google API's

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.