Answer
 
                
Aug 09, 2012 - 12:20 PM
Understanding The Current Conventions
If you’ve worked inside of the MVC Framework you’ve either explicitly noticed or been implicitly subjected to some of the conventions at work. These include things like:
· Names of methods in the startup class
· Project layout
· View search locations
· Routing expressions as they relate to controller and action names
· Web API exposing actions that are named as HTTP verbs
These conventions work to remove some of the effort we need to get our application running. Some of them are locked in - we can’t change the names of methods that are invoked in the startup class, for instance, as there is an explicit search for Configure and ConfigureServices - but others can be ammended, removed, and replaced on our whim.
There are four categories of conventions that we’re going to briefly discuss here:
| Convention | Interface | Description | 
| Application (Widest net) | IApplicationModelConvention | Provides access to application-wide conventions, allowing you to iterate over each of the levels below. | 
| Controller | IControllerModelConvention | Conventions that are specific to a controller, but also allows you to evaluate lower levels. | 
| Action | IActionModelConvention | Changes to action-level conventions can be made here, as well as on any parameters of the actions. | 
| Parameter (Smallest scope) | IParameterModelConvention | Specific to parameters only. | 
As your application loads it will use any conventions that you have added starting at the outter-most field of view, application conventions, then working it’s way in through controller and action conventions to parameter conventions. In this way, the most specific conventions are applied last, meaning there is a caveat that if you add a parameter convention by using IControllerModelConvention then it could be overwritten by any IParameterModelConvention, regardless of the order in which you add the conventions to the project. This is different from middleware, in a sense, because the order of conventions only applies within the same level, and there is a priority on level that you can’t adjust.
Building Your Own Conventions
I wanted to build a convention that celebrated how great rabbits were at math, specifically, multiplication. You know those rabbits! What I did first was to create an interface:
Understanding The Current Conventions
If you’ve worked inside of the MVC Framework you’ve either explicitly noticed or been implicitly subjected to some of the conventions at work. These include things like:
· Names of methods in the startup class
· Project layout
· View search locations
· Routing expressions as they relate to controller and action names
· Web API exposing actions that are named as HTTP verbs
These conventions work to remove some of the effort we need to get our application running. Some of them are locked in - we can’t change the names of methods that are invoked in the startup class, for instance, as there is an explicit search for Configure and ConfigureServices - but others can be ammended, removed, and replaced on our whim.
There are four categories of conventions that we’re going to briefly discuss here:
| Convention | Interface | Description | 
| Application (Widest net) | IApplicationModelConvention | Provides access to application-wide conventions, allowing you to iterate over each of the levels below. | 
| Controller | IControllerModelConvention | Conventions that are specific to a controller, but also allows you to evaluate lower levels. | 
| Action | IActionModelConvention | Changes to action-level conventions can be made here, as well as on any parameters of the actions. | 
| Parameter (Smallest scope) | IParameterModelConvention | Specific to parameters only. | 
As your application loads it will use any conventions that you have added starting at the outter-most field of view, application conventions, then working it’s way in through controller and action conventions to parameter conventions. In this way, the most specific conventions are applied last, meaning there is a caveat that if you add a parameter convention by using IControllerModelConvention then it could be overwritten by any IParameterModelConvention, regardless of the order in which you add the conventions to the project. This is different from middleware, in a sense, because the order of conventions only applies within the same level, and there is a priority on level that you can’t adjust.
Building Your Own Conventions
I wanted to build a convention that celebrated how great rabbits were at math, specifically, multiplication. You know those rabbits! What I did first was to create an interface:
 Fantastic Q&A
Fantastic Q&A
 
                            
 
        
By
REVEALED: The beautiful story of Preity Zinta's wedding dress
Every wedding has a beautiful story and it's the wedding dress that has some of the most beautiful details.
Preity Zinta was one such bride, whose gorgeous red gown at her wedding reception was filled with stories to be told.
<a href="http://www.yolobaba.com/category-2-b0-Women+Clothing.html" title="women's clothing">women's clothing</a>
Preity Zinta, who's back from some 'husband time' with Gene Goodenough in Shimla, had her wedding reception last night in Mumbai. Some of the Bollywood's biggest stars descended to celebrate Zinta's new phase of life.
<a href="http://www.yolobaba.com/category-2-b0-Women+Clothing.html" title="cheap prom dresses">cheap prom dresses</a>
Since we all love stories, especially a Bollywood one, we got hold of the super-talented Tanya Ghavri . She is the most sought after celebrity stylist in India. From Jacqueline Fernandez , Aishwarya Rai, Kareena Kapoor Khan, Freida Pinto to Katrina Kaif (we might actually run out of space if we list out the celebs she's worked with), she has styled every top-notch celebrity you can think of.
<a href="http://www.yolobaba.com/category-1-b0-Wedding+Apparel.html" title="wholesale wedding dresses">wholesale wedding dresses</a>
Tanya recently ventured into wedding styling with Dhoom Dhaam Weddings and Preity Zinta is one of her very first clients. So who other than the stylist herself can tell us the tale of the dimpled-cheek bride and her gorgeous dress. We'd advise all the bride-to-bes to take note because you're in for some great bridal lessons.
Introduction
<a href="http://www.yolobaba.com/category-1-b0-Wedding+Apparel.html" title="long prom dresses">long prom dresses</a>
Preity Zinta wore a custom Manish Malhotra red gown to her wedding party. "Red is her favorite color," tells Tanya.
Chapter One: The Bride's Wish
"When Preity spoke to me the first time about the outfit, I was so excited. Not only because I'm happy for her and it was going to be fun working with her, but also because I had started a wedding styling company (Dhoom Dhaam Weddings); making her one of my first clients. She was very clear from the start about what she wanted. Something in red or pink! We've worked together before so I knew what she likes and what she doesn't. She's a fuss-free girl. She likes her silhouettes to do the talking and the finish, ofcourse!"
Chapter Two: Who Chose The Dress
<a href="http://www.yolobaba.com/category-1-b0-Wedding+Apparel.html" title="wedding dresses online">wedding dresses online</a>
"The outfit was a collaboration of her choice and mine! But majorly hers because she had to wear it and feel like a million bucks. And she looked like one!"
Chapter Three: What Was Special About The Dress
"What I love about the outfit is the simplicity of its design: the gorgeous floral embroidery was so subtle but still added so much to the garment. The color, which is Preity's favorite, was so vibrant; it complimented her skin!"
<a href="http://www.yolobaba.com/category-2-b0-Women+Clothing.html" title="plus size dresses">plus size dresses</a>
Chapter Five: The Happy Ending For The Happy Bride
"When I saw the finished look I was so elated to see how beautiful she looked and how elegantly she wore the gown. She kept her hair and make-up so understated and subtle, with just an addition of red lips to finish the look! Like they say, happy brides are the prettiest brides!
<a href="http://www.yolobaba.com/category-1-b0-Wedding+Apparel.html" title="wholesale wedding dresses">wholesale wedding dresses</a>
Chapter Four: Details of The Wedding Dress
"The dress was made by the maestro himself, Manish Malhotra, so it had to be well-cut and well-finished. Manish's creations fit like a dream, as always!" It was a gown with embroidery but it was actually very light. So it was easy to wear and handle all night. Preity wanted to wear something she could look amazing in but something that also allowed her to dance all night. That was one of the first things she told me, which I always kept in mind! I love a bride who wants to have fun on her big day.
By
All kind of Women' Clothing,Men's Clothing,Toys, Kids & Baby,Shoes,Bags,CellPhone Accessorie. Find what's your want from www.yolobaba.com!
By
my own comment
Add New Comment