Giter VIP home page Giter VIP logo

blogmvc's Introduction

Helping you select a MVC Framework

These days there are plenty of Frameworks that can be used to create your server side code. CakePHP, Symfony 2, Laravel, CodeIgniter, Zend, Ruby On Rails... The list keeps growing and it's not easy to make a choice on what language or what framework to choose.

The goal of this project is to demonstrate how every frameworks works with a simple example : a Blog App.

Getting Involved

Unfortunately I don't know how to work with every frameworks (impossibru !) so I need you to create the Blog App using your framework of choice (not necessary PHP Framework, you can use ruby, python, java...).

You have to create a blog app using the HTML samples inside the HTML directory : HTML demo. The app is quite simple, you can manage posts, browse posts, and submit new comments (the goal is not to create a fully featured blog, but just a sample of code)

Database structure

You have to use the same structure as dump.sql. You can rename table and fields depending of your Framework conventions and you can even use migrations if your framework support it.

  • categories (HasMany Post)
    • id
    • name
    • slug (used for url rewrite)
    • post_count (count post associated with it)
  • comments (belongsTo Post)
    • id
    • post_id
    • username (not empty validation)
    • mail (email validation)
    • content (not empty validation)
    • created (date)
  • posts (belongsTo Category, belongsTo User, hasMany Comments)
    • id
    • category_id
    • user_id
    • name (not empty validation)
    • slug (can be empty, then slug is generated from name)
    • content (not empty validation)
    • created
  • users (hasMany Posts, used for authentification)
    • id
    • username
    • password

Routing

With great power, comes great routing ! (No seriously don't make the SEO guy angry)

  • / The homepage with blog posts
  • /category/{slug} Posts from a category
  • /author/{id} Posts from an author
  • /{slug} Single
  • /admin Backend entry point
  • /....?page=2 Pagination using query parameters

Additional rules

  • code for php >= 5.4 (it means you can use <?= !)
  • Post content is written using Markdown, you have to include a plugin (homemade or not) to convert this Markdown into HTML. (It's used to show how plugin work within each framework).
  • You have to login to access to the backend. The login is "admin" and the password is "admin" (use the users table to manage user).
  • Pagination is limited to 5 posts.
  • Posts and Comments are ordered this way : the newer first.
  • Data has to be validated before saving (for Post and Comments, see the database structure section), there is no "antispam" for the comment submission.
  • The blog has a sidebar that is the same for every page and you have to cache it (the cache has to be deleted when a post is saved/deleted)
  • Finally you have to create a readme.md to explain how to setup your framework and the requirements.

blogmvc's People

Contributors

alex-d avatar amilti avatar anthonycirc avatar bionik6 avatar caporaldead avatar elephantrose avatar golgotha29 avatar grafikart avatar imikado avatar jhuriez avatar jonathandasilva avatar macdu avatar orkin avatar scicasoft avatar tahiriabdou avatar thujohn avatar

Watchers

 avatar  avatar

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.