thanks Wanderley. you explain better than me.

we trying to build application on same way. Pls share if you have any 
sample application.

On Tuesday, November 5, 2019 at 4:38:20 PM UTC-5, Wandss wrote:
>
> I would need to have more detailed information so I could understand the 
> real needs.
>
> Sorry if you already know what I'm going to explain here, but depending 
> you background and technologies you've been worked with, working with 
> Django and Django REST is a bunch easier than other frameworks, since 
> Django and Python itself has ome design patterns implemented "native" .
>
> In some design patterns you need to use DAO and other stuff and write too 
> much code (not saying this is bad or good).
>
> Django follows Python idea to achieve more by writing less code. Regarding 
> models, Django implements (follows) the Active Record Design pattern.
>
> So, if I could understand your ideia, with Django Rest Framework what you 
> would have is:
>
>
>    - Model (Urls and Views)
>       - used to expose outside API data-contracts (in Django this would 
>       be the views.py file)
>    - Message Entity (Serializers)
>       - translate data Model ==> to MessageEntity and carry forward 
>       different layer (this would be done in serializers.py file)
>    - DAO (Model)
>       - its march with database table (models.py file with some 
>       managers.py, case necessary)
>    
> Another major and important concept about Django relies in understanding 
> the "apps concept"
> Take a long at Two Scoops of Django.
>
> Different than other frameworks, Django advocates that you shouldn't have 
> a massive monolithic project, but a project divided in many apps, this will 
> allow you a loose coupling.
> Well, hope I could help in any way.
>
> Cheers,
>
> Wanderley
>
>
>
> Em ter., 5 de nov. de 2019 às 18:39, Gonzalo Amadio <[email protected] 
> <javascript:>> escreveu:
>
>> You can use DRF to do the exposed API. And then internally, you can 
>> manipulate the data as you wish before saving it to database.
>>
>> You can do like another service layer between the models
>>
>> Check this enlightening articles:
>>
>>
>> https://medium.com/@jairvercosa/business-logic-in-django-projects-7fe700db9b0a
>>  
>> <https://www.google.com/url?q=https%3A%2F%2Fmedium.com%2F%40jairvercosa%2Fbusiness-logic-in-django-projects-7fe700db9b0a&sa=D&sntz=1&usg=AFQjCNHHRkUxEafNr9ohITpt6Z2D2CSv6A>
>>
>> Same post, but more complete https://github.com/jairvercosa/ca_auth/
>>
>> If you do not want to save using the DRF views, you can from the service 
>> layer, send the information somewhere else and do not use DRF save()... 
>> but, I do not really see the point of doing this. 
>> You will be just using DRF to make the routes, and you will spend all the 
>> power.
>>
>> El mar., 5 nov. 2019 a las 1:39, woodson (<[email protected] 
>> <javascript:>>) escribió:
>>
>>> we are planning to build large application using Django rest framework . 
>>> is it possible create different model or data contract ?
>>>
>>>
>>>    - Model
>>>       - used to expose outside API data-contracts
>>>    - Message Entity
>>>       - translate data Model ==> to MessageEntity and carry forward 
>>>       different layer
>>>    - DAO
>>>       - its march with database table
>>>    
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django REST framework" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] 
>>> <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-rest-framework/abeb31aa-b4a7-4473-8901-372fe2aee2d6%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-rest-framework/abeb31aa-b4a7-4473-8901-372fe2aee2d6%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> -- 
>> --------
>> Gonzalo Amadio
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django REST framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-rest-framework/CANyTv7rrtBszvam%3DZh4Umo%2BBSSDALL3CqXsqGzWL7cA%2BRxew6g%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-rest-framework/CANyTv7rrtBszvam%3DZh4Umo%2BBSSDALL3CqXsqGzWL7cA%2BRxew6g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/d20c32e9-38b5-4042-a7c1-a17c219ccf86%40googlegroups.com.

Reply via email to