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
General - Research structure for front end organization and make write-up of front-end practices #55
Comments
File Naming ConventionsFor Project StructureWe should separate our current General Thoughts
https://reboot.studio/blog/folder-structures-to-organize-react-project/ |
Yeah I totally agree with all of this; I think it'll go a long way towards making the codebase a lot more accessible for new members as well. I would suggest doing it in stages just so we don't confuse people. Imo, the naming convention stuff/ pages and components folder stuff should just happen asap though. I would also appreciate an explanation/justification for having 2 package-lock.json files that seems weird. |
definitely agree with all of this. components have way too much logic in them and we need to start simplifying some of the pages before they get out of hand. The project restructuring sounds great too. I have issues with our 'utils' folder in general although I may not understand the reason why we have it the way we do. |
This sounds good to me. Just make sure we’re changing the file name and the containing folder name.
I disagree with this. Have you seen this being done in industry? I’m of the opinion that devs need to learn to read files. How do you tell if something is exported from the file? Read the file contents. How do you tell if something is back-end? It’s in the back-end folder. These are not things I think should be handed to them on a silver platter.
Sure that sounds good to me.
Agreed, where possible. Business logic should primarily live in the back-end, and be presented by the front-end.
I’m not sure about this. Services are what connects the front-end to the back-end. Business logic should not live in there, unless we have a different understanding of what business logic is. I’m also hesitant to say it should be classes. Our project doesn’t use class-based design patterns, so I’d be curious to see what you think it should be and why you think it would be beneficial.
This sounds good and makes sense to me
The
Having constants would be a good idea.
Which two are you referring to? If you’re referring to the
Sure, yeah, that could work. Though, they are the services, so I’m not sure what you imagine services would be from a front-end perspective if not hooks and api methods.
Sure
I swear we had a ticket for this because I remember someone trying it before and not succeeding, but I can’t find the ticket so oh well. Definitely a good idea if we can get it to work.
Sure, but this falls under DevOps, which is something I’ve been saying needs more dev attention the entire past year. |
I believe I read this from one of the articles I linked. It's partially done at Wellframe in our repo for all our front-end stuff. I agree that devs should learn to read files, and although things definitely shouldn't be gifted to devs on a silver platter, they should still look for ways to make their lives easier and I thought that this was one way of doing that (which I guess is kinda contradictory). Can I take this as you agree with the action of using PascalCase for our file naming convention but disagreed with my reasoning? If so, are you favoring applying this naming convention to all files or just front-end files?
But why do we have this local module inside our repo? Are we not able to move this up and combine it with our top level
I kinda include everything that's not code related to displaying a view as business logic, which is probably incorrect LOL. and also why we have different understandings of what business logic is. Tbh I mentioned classes because that's what my co-op does for their services. They use class-based services to make API calls and also to house related helper functions (like transformers). I did not completely research this section so I can look more into it, but having it be class-based looks nicer in my opinion than just having a file with a bunch of functions (albeit the class thing is just boiler plate code and it wouldn't take in any constructor params or anything). |
Mentioned this above, but I would also include helper methods that are closely related (e.g. transformers) as a service as well. Not sure if that's correct though since I have a limited knowledge of what services should be |
Yep! That’s accurate.
Not sure, tbh. Give it a whirl whatever way you think is best and then let’s go from there.
We have this local module because our back-end is comprised of AWS lambdas and those require an isolated bundle of code to deploy. Because we don’t fully control our bundle packing and deployment stuff, we have to ensure that everything imported to a lambda is part of a module / package which can be pulled into the bundle. Importing anything using relative file paths in a lambda would introduce a linkage that would break when bundling happens because the reference file won’t be pulled into the js bundle.
That makes sense! I think of business logic as being things that encode the business processes. Things like “timeline status is calculated by ….” or “duration of a project is calculated as latest work package end date minus earliest work package start date”. I think class-based could definitely be nicer, but I’m not sure, so I’d be curious to hear how you want to do it. Our functional system has grown in a fractured method, so perhaps switching to class-based and standardizing what we need could be useful. |
we implemented most of this yahoo |
Spike Type
Technical
Goal
Improve the organization of front-end components and overall project structure for things related to front-end, and create a wiki or docs page listing out what practices and style we want to use for all our front-end files.
Reason for Spike
To standardize our practices so it's easier for new devs to onboard and all our code follows best practices (to some extent)
Additional notes
may need to look into how we want to also test front-end components too and make a doc on that
The text was updated successfully, but these errors were encountered: