-
Notifications
You must be signed in to change notification settings - Fork 24
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
RFC 0008: Future of the Back-Office Front-End #8
Conversation
Below are some points that were discussed during the open circle session led by pete at cg19. I have tried to link em as best I could to the existing points. 3.1 There doesn't seem to be a code map of where which dependencies/directives are used in the code base. If this existed and somebody updated a service, directive, controller,... they could see in which places in the back-office it is actually used and test all of these areas. We proposed 2 ways this can be done.
7 (new) There doesn't seem to be a product owner
2.1 Strong typing
|
I personally don't believe strong-typing spaghetti code is worth it. The problem is the architecture. Strong-typing a bad architecture can actually shackle future development. IMO the best way to get the architecture in shape is to wrap the spaghetti in SOLID decoupled strongly typed classes, and add unit testing to those classes. So you are only strongly typing "good" code. You may then deal with the spaghetti in a calmer way. |
Accessibility is mentioned only as a part of the user experience. I think that is something worth to have a separate section. And we should also mention we need at least an AA level as discussed during open space by @MikeMasey |
Additional post-CG19 bit from the open spaces - the actual folder/file structure of the project should be reviewed and improved. Given the build task largely doesn't care where it finds the assets, this is a low-risk activity, but would reduce complexity (gulp task does reference paths, but these are high-level so moving within these would be fine, new folders would require task changes). It's difficult to navigate the project when we have lovely paths like Any substantive changes to existing code should be moving as much as possible to being framework agnostic, to clean the update path (where ever that path might actually lead) => think consistent patterns, ES6, typed classes etc |
I'm in the middle of writing a longer reply to this but thought I'd best just pull some of the existing thoughts, content and issues together now for others to read in the meantime. Been thinking about this one a long while so there is quite a bit out there already: Related issues from the old tracker (now over a year old) https://issues.umbraco.org/issue/U4-11042
See more details of this idea here: umbraco/Umbraco-CMS#5047 Converting the existing code base to use TypeScript (and reasons why we might want to): umbraco/Umbraco-CMS#5215 Getting "PrettierJS" in the build chain so we have a consistent way of formating our JS: umbraco/Umbraco-CMS#5211 Agree a coding style for AngularJS 1.7 moving forward: umbraco/Umbraco-CMS#4913 Tidy up the many free standing controllers by pulling them into directives: umbraco/Umbraco-CMS#4875 Plenty more to come. I'm trying to put together a "battle plan" thats pragmatic and achievable that will get us in a place where we could then enjoy the tidy code base for ease of bug fixing, development and have a clear view of what the code base looks like. I hope that code base can then "hold the fort" while future framework choices etc. can be made with a clear head and a clearer view of what it needs to replace. In the meantime, a better code base for all for as long as we need it. That is the short version anyway. |
In my opinion this is the way to go forward, emphasis on the reasons why. How is up to people with more experience/knowledge than me. |
Hi everyone Thanks for bringing your concerns to the table, we will be diving into specifics on how to move forward. But to keep the conversation on our goal and purpose of changing the front-end, I would like to ask you to consider the following questions:
— Can you elaborate on what you think is important for this project? Thanks |
Yes, the current code base is and has been for a long time an "additive" code base. No one does any tidy up work for fear of breaking anything. This is down to a number of factors I think we can mitigate:
I'm all for looking to the future and what amazing wonders the back office might be built with in the future but in the meantime I think we can gain a lot of goodness from focusing on repaying some maintenance debt, cleaning up the code base to ease bug fixes, feature developments and simply increase ease of contributions. To do that we need to invest some time in a sane, safe and managed code clean up. My believe that a code clean up should be the first step is based on experience in this project and numerous others we've done ourselves at Offroadcode. I think discussing a rewrite now is too soon and we would end up with a V5 again if we took it on as is. I think trying to do a prototype sprint to see what could be done right now is also too early, the API's aren't up for it. We would end up with a pretty UI that does 10% of what it should (and only the easy stuff) but we would be no further on. A hybrid approach bloats the code base and doubles the knowledge needed and puts up barriers to contribution rather than reduces it. Magically hoping we can fix everything with "unit tests everywhere" or "make everything SOLID" are noble statements but they aren't currently achievable with the code in the current state or require specialist knowledge and epic solo efforts or death by committee style coding. I'm all for tests but currently the code isn't testable easily. We can burn a lot of time trying to do that first and then rework many of those tests as we refactor or we can make the code easier to work with first which in turn will become easier to test (removing $scope leak for instance) and have the benefit that the code base just gets better along the way. Yes it means we will have to do some manual testing while we do it but that has got us quite far so far, lets lean on it some more one more time until its in a better place to then unit test it to the eye balls. At some point we have to clean up the mess. The only way to untangle a slinky is to sit down and spend some time untangling it.
You wouldn't be able to remake a car from a car crash (don't worry I'm not saying the code is that bad, its just a visual) so we should pull the car back into a recognisable shape so we can see what we are facing and make it easier to work on it. In short I'd suggest this as a plan of action (each step gets us to a better code base than we started):
The "tidy up the code base" plan needs some over-sight from HQ but I think a lot of the work can be done by the community if it is scoped out nicely and in small enough units (ie convert one file to TypeScript, Write one test to do X then do a PR on that one thing). Its going to need someone (or more) to manage the number of PR's coming in (which ideally will be small and concise so easy to accept). It really needs someone inside HQ who can champion it, dare I say the back office needs a product owner who has final say, authority and clarity of vision to get this to where it needs to go in a planned, managed and achievable way. Without this we might as well not start as there will be no guarantee of getting any of this work in. Once we have community momentum on this I think it can be turned around pretty swiftly but we can't have that momentum rocked or paused as its hard to get it going and harder to restart it. Plan it out and then ask for help, show that that help is having a positive effect. Simples. We need a way to track issues we find while doing all the above (remember our plan isn't to do a huge refactor straight away, each step we will find things that need revisiting at the right time). I'd suggest a temp separate issue tracker (currently I'm doing this via the spreadsheet mentioned above but it might not scale) but the existing Umbraco one might handle it too. Issues that we find that we want to come back to and refactor for instance need logging somewhere. We could add a comment in to the code for those areas but again that needs to be documented and agreed so we have a standard way to do that and find them again. We ideally need some leaders on this to engage the community too, its a big job but by us all doing a few small steps of it and if we have enough of us at it we can get a lot more done than just HQ on its own ever could.
I'd be tempted to time box the development so we have a target to focus on, currently its so open ended that we might end up with nothing coming forward at all. I'd reduce the scope of this RFC to focus on how to prepare the code base to get it to a point that we can see what the lay of the land is so we can make some good informed choices about back office 2.0 currently its so board I fear we will end up "bike shedding" for months and progress little. The future rebuild can come in another future RFC. The competition in the CMS market aren't hanging around, lets keep up to date and get this thing ship shape. |
Thanks for your enthusiasm and extensive thoughts on how we can make this project succeed. The intention of this RFC is to align(begin transparent) on the goal we aim to achieve. When we have that settled (when this RFC is closed), we will be opening new RFCs regarding a concrete strategy, or several strategies, on how we potentially could reach the goal. Therefor I will encourage you to keep these thoughts a little longer. They are good inputs but you'r one step ahead. 😉 Until that please continue thinking about this strategy. Imagine everything was done as you suggest. The next and important step would then be: How would we move on with refactoring the code?, how much time would we set aside for that part?, how would we make sure to have an aligned procedure for contributors to follow when refactoring? I even have to ask you again: why would we refactor? 😉 — now that the code is in a better state, what arguments do we have to set the time aside and motivate community members to take part? What is it that we want to achieve with the refactoring? BUT please don't answer those specific questions in this thread, thats not the purpose of this RFC. Let's try to keep it mainly regarding the arguments/reasons for change/refactoring. We are trying to gather the arguments that we later can use to lead us when making decisions on strategies, implementations and technologies. The conversation regarding your specific strategy could for now continue here umbraco/Umbraco-CMS#4913 or on Our? Until the RFCs for it is in place. Thanks 😀 |
Having talked to Niels about this already, I thought I would share my thoughts inhere as well...
|
@nielslyngsoe thanks for the feedback. I've reread your reply a few times now and reread the original RFC and I'm confused as to what response or direction you want me to go in. Can you elaborate or give me some more focus? I "think" your asking me for some more blue sky thinking over an action plan but that sort of is the opposite of what you asked of me at Code Garden hence my confusion I think ;) My ideas above satisfy all 5 of the main motivation points in the RFC, it meets all 6 of the Opportunities listed too. Its achievable and mapped out as to how to do it. I totally agree with this motivations and opportunities. I'd have thought these are the purpose of the RFC in which case they already list what is the desired outcome brilliantly. I do have my doubts on the proposed solution though, I fear it will lead to a half finished mishmash as the sheer scale of the job as is shows itself and then we ship with half the back office converted and we actually end up breaking several of those motivations and missing several of the opportunities (how can we be making it easier to contribute when you now have to know two different frameworks, one in a poor state of health and the glue that we've home brewed to stitch it all together). For me whenever I take on a project I have to feel it out and scope out what needs doing. That can sometimes take a long time and multiple rounds of "clean up" of the code base before we know the best route. I'm just applying the same battle tested route to the back office rebuild. We all want it to be amazing, the question is what does that look like and how do we get there? Without any constraints on what is or isn't doable we can end up just losing a lot of time dreaming about future frameworks and border styles. At some point we need some constraints to focus on what is or isn't important/needed/doable. Personally I think its too early to be thinking about future framework choices, we don't even know what the current code base is doing so how can we recreate it (and make it even better) than the current one? We should consolidate the current code base (ideally without breaking any packages if we can), have upgrade guides and compatibility poly fills (to make name changes etc still work on older code and throw some helpful console warnings telling you what to update) where we can and document it. That can be it for v8. Then from that point you can think about what vNext is going to be like. Ideas for the back office regardless: I'd love to see:
All of the above is doable within the existing framework btw. I'm a ReactJS fanboy and should be shouting from the roof tops that we should write it in that (apparently) but I don't think we are at the framework choice stage as yet. I think the existing framework can keep us going for another 4 years with ease if we need it to and if we invest in some long over due house keeping and make the back office a first class citizen again. If I've gone off track again let me know. I'm struggling with the mixed nature of this RFC being both very open ("blue sky thinking") yet restricted ("here is our solution") at the same time. It seems to be facing two ways at once. Mix in some 10 years of Umbraco history and 20+ years development experience and you get the ramblings above. Hope they make some sense and add to the discussion. |
|
Would it be worth looking into Blazor? |
There is an issue for this already for completeness umbraco/Umbraco-CMS#3910 |
It has been a while since the last comment on this issue. AngularJS has LTS support until 1st July 2021 (of course it will still work after that time) but moving to something new will also take time so I'm curious how this RFC and optionally the ones resulting from this RFC will be placed in time. Just curious if there's an update on it. Thanks. |
@techmind-git you're absolutely right, this has been open for a very long time. There's a lot of great stuff in here. We will add a final-comment-period so we can get this one closed and digested. I've not been a part of this RFC so far, so forgive me for being vague right now, there's a lot here to take in :) The RFC itself seems to raise a lot of questions and my immmediate impression is they won't be answered in one go. |
We will not be accepting this RFC, so rather than putting it in a final comment period, I'm going to close this PR. This does NOT mean that we will not be looking at improving the backoffice frontend or addressing the choice of framework for a future version of Umbraco. I'd also like to underline that the discussion that has been had here is not in vain. It will likely be the starting point for several RFCs based on the topics discussed but we want the RFCs to be more focussed, actionable and align with the current roadmap. Comments will still be open, even though the RFC is rejected and you are more than welcome to continue the discussion and add additional ideas. Thanks for the contributions so far. If you have any questions don't hesitate to reach here, on twitter @hemraker or send us an email on product[at]umbraco.com. |
Thanks for the update Rune, 10 weeks since a HQ response before your comment, welcome back. I can't help but feel more that a little frustrated that 5 months on from initial issues that raises the need for some direction/action on the back office (umbraco/Umbraco-CMS#4875) and we are still none the closer to having an official idea or buy in of what the future of the back office looks like as far as HQ is concerned. As a result the community has no idea what to work on, so we work on other things (I've been doing a lot of robotics with and for my boy for instance). I guess more time is needed. |
@PeteDuncanson thanks for the welcome back 🙌 Thanks for voicing your concern. My reason for closing the PR in its current state speaks to your point about no responses on this PR for 10 weeks and no direction/action after 5 months. An open RFC has to indicate that we are actively working on it or it is road mapped for the near future. This RFC was one of the first created after the Codegarden retreat and the idea was to capture what was discussed at the retreat and open up the discussion to the community at large. To some extent, I do think it has served this purpose and it is an improvement over previous years, where discussions from the retreat, especially blue sky thinking like this, did not reach a wider audience. What we have learned is that for this to be a good tool we need to be better at focusing the RFCs. The TinyMCE one is a good example of this. It is based on two previous RFCs where the discussions, prototypes, user tests etc. has helped shape the one that finally got accepted and is now being worked on. While not perfect, I think there are a lot of good takeaways from that process. We want to be as transparent as possible with what we do, are doing and intend to do. So while I totally understand your frustration, I hope you understand the reasoning. And just to re-iterate:
To quote my previous response "It will likely be the starting point for several RFCs based on the topics discussed", by this I mean we will use the knowledge captured here when we embark on a project that is related to one of the many topics covered here. |
See RFC document (in this PR): 0000-backoffice-future.md
Summary
With this RFC we are highlighting priorities for making new decisions for the future of the Umbraco CMS front-end project. This document outlines several areas that we believe should be part of the discussions which can then lead to decisions on technology, implementation and roll-out strategies.