+ All Categories
Home > Entertainment & Humor > Ahsanul Bari: Convention over Configuration

Ahsanul Bari: Convention over Configuration

Date post: 29-Nov-2014
Category:
Upload: sqabd
View: 916 times
Download: 0 times
Share this document with a friend
Description:
www.sqabd.com
12
Convention over Configurat ion Ahsanul Bari // Ahsan (http://ahsan Trippert Labs , Inc.
Transcript
Page 1: Ahsanul Bari: Convention over Configuration

Convention over

Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Page 2: Ahsanul Bari: Convention over Configuration

So what is it?

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

We use it all the time, in our everyday life, and in software development!

Here goes the boring definition:“Convention over Configuration is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, but not necessarily losing flexibility.”

Page 3: Ahsanul Bari: Convention over Configuration

We use it all the time!

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Each of us have conventions e.g. where we keep DVDs, morning chores, habits (good or bad)!

We have conventions for where we place our files in our hard disks! Conventions help us to

be more productive in our daily lives!

Page 4: Ahsanul Bari: Convention over Configuration

We also use it when

developing software! Ahsanul Bari // Ahsan (http://ahsanity.com)

Trippert Labs , Inc.

Each of us have conventions when in comes to naming files, functions, classes

Conventions for how we add comments

Where we place models, controllers and views

How and when we add events to DOM

And many more ...

Page 5: Ahsanul Bari: Convention over Configuration

If everyone already knows

and uses it, then whats my point?

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Page 6: Ahsanul Bari: Convention over Configuration

We can use the idea of 'Conventions' to

reduce the amount of configuration files:

Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Page 7: Ahsanul Bari: Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

With configuration files, it takes time to get a project running, each

time, everytime!

Many software development platforms and frameworks have tones of configuration files!!!

With the complexity of an application the size and number of

those files grows as well.

Page 8: Ahsanul Bari: Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Instead

<hibernate-mapping><class name="User" table="users"> <id name="ID" column="id" type="string"> <generator class="assigned"></generator> </id> <property name="password" column="password" type="string" /></class></hibernate-mapping>

CREATE TABLE users ( id VARCHAR(20) NOT NULL, password VARCHAR(20), PRIMARY KEY(id));

Convention: all model classes will be singular, and will have plural table names

Configuration

Convention

Page 9: Ahsanul Bari: Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Faster development

Good things!!!!

Promotes uniformity

Easier to maintain software

No huge configuration files

Structured Code Base

Page 10: Ahsanul Bari: Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

Requires familiarity

Bad Things!!!!

Larger framework

Hard to refactor existing frameworks to adopt a new convention

Page 11: Ahsanul Bari: Convention over Configuration

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

A few frameworks that uses CoC

Ruby on Rails

CakePHP

GrailsJBoss Seam

And many more

Page 12: Ahsanul Bari: Convention over Configuration

So it is really that useful? Thats for you to find out

and decide.

Ahsanul Bari // Ahsan (http://ahsanity.com)Trippert Labs , Inc.

I like it, so here I am , talking about it! :D


Recommended