Click here to Skip to main content
15,886,851 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Require Js Pin
thatraja18-Sep-14 3:29
professionalthatraja18-Sep-14 3:29 
GeneralRe: Require Js Pin
Suraj Sahoo | Coding Passion18-Sep-14 4:04
professionalSuraj Sahoo | Coding Passion18-Sep-14 4:04 
GeneralRe: Require Js Pin
thatraja18-Sep-14 4:14
professionalthatraja18-Sep-14 4:14 
GeneralRe: Require Js Pin
Suraj Sahoo | Coding Passion18-Sep-14 4:16
professionalSuraj Sahoo | Coding Passion18-Sep-14 4:16 
Generalpop up on button click in wordpress Pin
AMRITESH ASTHANA15-Sep-14 2:19
AMRITESH ASTHANA15-Sep-14 2:19 
QuestionVideo streaming in web Pin
Dharmaraj Balasubramanian15-Sep-14 2:03
Dharmaraj Balasubramanian15-Sep-14 2:03 
QuestionMessage Closed Pin
7-Sep-14 9:21
hadoopTraining7-Sep-14 9:21 
QuestionWeb API - Pros And Cons of more open structure. Pin
Rover2341 - Mark Dickinson7-Sep-14 7:46
Rover2341 - Mark Dickinson7-Sep-14 7:46 
First off When I say Web API, I am referring to having a asp.net pick up on url, using rest. (If it wasn't rest it wouldn't matter for my question, Also wouldn't matter if it was asp.net).

Question: What are the Pros/Cons of having a strict API Vs a Loose API

(What I mean)

Strict API: UpdatePerson(string ID, string Name, string Age), UpdatePerson(string ID, string Name), UpdatePerson(string ID, string Age)
Loose API: UpdatePerson(string ID, Dictionary<string, string=""> Propertys)

Strict API: All Pram's are required.
Loose API: The Prams are list of property's, And you ask for what you want or what you want to change.

I am mostly worried about the theory on this not the code it self. As They could pass in a Person Object, that has a way to see whats been set and what has not, and that would more or less be the same thing.


My Thoughts
Using Loose Over Strict.

Pros:

* Reduction in Total API'S
* When Person has 20 property's, Its more then likely not all combos are made for it, thus allowing more options form the user side.
* Streamlined Documentation
* Testing - Although all the logic, and rules for updating a person are in one location, and requires all update situations be dealt with. (Prehaps they are not allowed to update first name if they dont send in last name). With the amount of reduction in apis I believe this would be more manageable.
* Time - Currently If a API needs built for person, If I am the one needing it i just write it out, but if someone else is needing it, then they need to wait on me, and i need to build it test, and get back to them. I have found they often realize they need slightly more or less data
* Flexible - Often the requirements change, and we need to adjust a api to add one more value or remove one more value. With Loose, The API It self wouldn't need to be changed, but only the user calling it, needs to ask for one more value or one less.

Cons:
* Testing - This is Debatable, So ill put it here, But I believe its a pro.
* It may not be allowed to update x, y, z with out m. this would need to be in the documentation, and could require some complexity for the user. As strict would only allow the ways that were 100% ok to use, and that were expected to be needed.

Use Case:

I am looking for a better way to code in general. That being said here is my use case.

I am working for a company and we have 3 .net Devs (including me), and one front end designer (html/javascrpit/css).
I have a website, that has over 100 apis they need to hit. Often the requirements from above change slightly and we need to adjust 2-3 apis to take in more or less data, and add another api.

Its not a huge deal when i am doing the page, and all the parts. But when I am not, it becomes a process. The UI Guy, comes to me with the request, I do it, test it, document it, then refer him to the updated documentation. He then uses it, some times finding that there is in issue, other times finding that there more data he needs or less that he wants to pull or update. Small changes end up taking a large amount of time going back and forth.
Questionerror has acquired with registration form Pin
Member 110638926-Sep-14 14:57
Member 110638926-Sep-14 14:57 
AnswerRe: error has acquired with registration form Pin
Richard Andrew x646-Sep-14 16:03
professionalRichard Andrew x646-Sep-14 16:03 
GeneralRe: error has acquired with registration form Pin
Member 110638926-Sep-14 16:57
Member 110638926-Sep-14 16:57 
GeneralRe: error has acquired with registration form Pin
Member 110638926-Sep-14 17:01
Member 110638926-Sep-14 17:01 
QuestionFile Upload Using Query String in PHP Pin
jasonalien3-Sep-14 20:48
jasonalien3-Sep-14 20:48 
AnswerRe: File Upload Using Query String in PHP Pin
Richard MacCutchan3-Sep-14 21:31
mveRichard MacCutchan3-Sep-14 21:31 
GeneralRe: File Upload Using Query String in PHP Pin
jasonalien3-Sep-14 21:33
jasonalien3-Sep-14 21:33 
GeneralRe: File Upload Using Query String in PHP Pin
Richard MacCutchan3-Sep-14 22:05
mveRichard MacCutchan3-Sep-14 22:05 
AnswerRe: File Upload Using Query String in PHP Pin
Richard Deeming4-Sep-14 1:37
mveRichard Deeming4-Sep-14 1:37 
GeneralRe: File Upload Using Query String in PHP Pin
jasonalien4-Sep-14 2:04
jasonalien4-Sep-14 2:04 
QuestionHow to update a form and submit using jquery and ajax Pin
Member 109499862-Sep-14 6:41
Member 109499862-Sep-14 6:41 
SuggestionRe: How to update a form and submit using jquery and ajax Pin
Kornfeld Eliyahu Peter2-Sep-14 7:12
professionalKornfeld Eliyahu Peter2-Sep-14 7:12 
Questionvb.net web form generates extra blank lines Pin
dcof1-Sep-14 7:31
dcof1-Sep-14 7:31 
Questionmysqli update Pin
Charlie Kirk26-Aug-14 15:32
Charlie Kirk26-Aug-14 15:32 
AnswerRe: mysqli update Pin
Graham Breach26-Aug-14 22:48
Graham Breach26-Aug-14 22:48 
AnswerRe: mysqli update Pin
Charlie Kirk30-Aug-14 17:47
Charlie Kirk30-Aug-14 17:47 
QuestionSample Mvc 4 Application t Insert data into the database and Bind Them to grid Pin
Member 1103238424-Aug-14 1:19
Member 1103238424-Aug-14 1:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.