ruby on rails - is REST always feasable when designing an app? if not, what then? -


I am working on a site, but can not come up with a good design for its implementation. Here's the flow:

The user selects a shirt. The user's choice is the size of the shirt what the user says what they have to do, and it is added to their car. They can repeat or go checkout.

The problem I have is for the line_item to be added to the car, it requires a sku and a design record. Design records are made at the point where they add it to their car.

Right now, I have everything in the Store_computer

Then I have the preparations like- prepare_for_cart, add_shirt_to_cart, confirm_order, add_design, show_receipt ... I do not know how I would like this stuff I can put some rest in it.

It is something that can always be worked with the rest, or does it really work in some cases? What to do to try and make it more powerful and understandable? Are there other applicable design patterns to consider?

In almost all cases REST is a possibility, but this is not always the best possible option for example If you have an ending point that requires sending an email, you can create a unique URL for:

  get email / (which makes) email / 12345  

Similarly, with your design, it will be possible like the URL:

  train / 1234 (a new vehicle for the car To add footers, add current cart content, post for post). Cart / 12345 / shirt (a specific item in the cart which can be removed)  

One thing that you need to do about this Can help to think, to stop thinking about url and in the most important way only think about the documents that you are sending back and forth for 'RE' representation in REST GET, PUT, DELETE methods are available to the customer The simplest way to move from server to Rtiniditv.

Edit

Good, comfort is a very good design. It is not easy to implement or even consume. But it is designed to be strong, which can last for up to 10 years and be backwards compatible. Just like the web.

This investment can not be worth it to you, you just want to use the approach that is easy to implement. Of course, you will not be REST-compliant. It's not just for anyone, it takes a look at the average API to work from a big dealer, to understand that many people do not not a Have decided to apply the cool design.

Supporters and Opposition for themselves; Technical qualification is the only thing that is finally counted.

The fact is that you will have to ask, 'How do I make it happy?' Tells you that you need to do more research first, and tell what and why in REST, in general.


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -