-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very good desing! appreciate it! #27
Comments
Hi, thank you! So, if you wanna use this API in a web application, you could call its routes directly. you can find all of them in the documentation along with instructions on how to execute the API. lemme know if you got any issues. |
thank you for response. i just wonder that implementation of web page with html engine render. |
when i looked the code, you use routeadapter only sends JSON. i couldnt decide which way is better for clean architecture principle to make ports moduler like plugable. |
because when i look your desing. it seems that another framework like gin or other can be implemented because of clean arch. |
Hey. I see your point. So, indeed switching to another plugin like gin would be easy given the clean arch implemented. In your case, if I got that right, you wanna serve a static page directly, right? If that's the case, I think you can create some new functions on the presentation layer for serving those pages. Those functions should implement the controller interface. After that, you could create a new adapter that serves the page instead of taking the JSON data. lemme know if you think that's a good approach. |
firstly i want to use your structure for gofiber template. in fact i am interested in creating clean architecture login system with privacy like encrypting some information and hashing some others. in order to do that i am trying to understand how can i change your structure or make new files to get web pages for gofiber framework first. my second concern is another person can change this structures to adopt another framework, so we will have open source login system with JWT and cookies. these are things in my mind. first of all , i think i need to change gofiber routes or adding new routes like your routes will be /api/something/id and my web routes will be /singuppage, / loginpage , /forgotpasswordpage etc. i think generating another fiber routes will be ok for web page rendering. maybe sending http response is not ideal. i could not decide yet. |
you project is wonderful for only api system. not compatible for web page rendering. if we may add it , it can be best clean architecture example |
That's quite an interesting use case for this project. Indeed, when I did it I was not concerned with web compatibility, but as you said, creating new routes for serving the web pages could be a solution. As I said, I made an abstraction over a controller. So you could create some structs on the presentation layer that implement that same interface and create an adapter for them. I'll think more about that when I get more time, maybe I'll try to implement it just to see how it goes. Anyways, thank you for your comments, and lemme know if you get any other ideas. |
thank you for information and good comments. i will create something based on your work or structure and i will let you know about updates. you created different controller implementation, making new main implementation is very good idea for me. |
may i ask why you used custom validator for api presentation side. inside of entity section. you used asaskevich/govalidator but in api side you used another custom validation. is there any special reason? |
hi,
it is very good desing and implementation of user system api.
i wonder that if we want to add web version, how we can add it?
thank you.
The text was updated successfully, but these errors were encountered: