Programming/Comparisons: Difference between revisions
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
* /Pages/*.razor | * /Pages/*.razor | ||
* /Pages/*.cshtml | * /Pages/*.cshtml | ||
* /Shared/*.razor for partials | |||
|- | |- | ||
! Controllers | ! Controllers | ||
Line 50: | Line 51: | ||
* Used in /Pages/*.razor | * Used in /Pages/*.razor | ||
* /App.razor to rescue unauthorized | * /App.razor to rescue unauthorized | ||
|- | |||
! Data Services | |||
| | |||
* /app/controller/*rb for basic data access | |||
* /app/services/*.rb for more complicated data access/manipulation | |||
| | |||
* /Data/*.cs | |||
** However, these classes are usually wrappers around API calls to other services - C# .NET best practices usually entail a series of micro-services instead of a monolith, meaning the frontend does not directly interact with the database. | |||
** Since this folder can get pretty big, you'll have to split this up yourself. Some folders I've used are Services, API, Authentication, and Exceptions. | |||
|- | |||
! JS/CSS | |||
| | |||
* /app/client/packs/*.js & /app/client/packs/*.css for Webpacker | |||
| | |||
* /wwwroot/css/*.css | |||
* Blazor does not use Javascript | |||
|- | |||
! Asynchronous Calls | |||
| | |||
* Ajax/HttpRequest | |||
| | |||
* SignalR/WebSockets | |||
|} | |} |
Revision as of 10:07, 9 August 2021
Frameworks
Ruby on Rails and Blazor
Ruby on Rails and Blazor | |||||
---|---|---|---|---|---|
Ruby on Rails | Blazor | ||||
Language | Ruby | C# | |||
Models |
|
| |||
Views |
|
| |||
Controllers |
|
| |||
Routing |
|
| |||
Permissions/Authentication |
|
| |||
Data Services |
|
| |||
JS/CSS |
|
| |||
Asynchronous Calls |
|
|