I've an architectural question.
I have a component-based Design System library that I share across multiple projects. Everything is developed in ReactJS. One project is a monolyth and another is microfrontend-driven (with SingleSPA). As soon as the projects get big and the UX/UI needings grow up, I'm encountering some difficulties in sharing it across those projects.
An example could be that project A needs some sort of css customization, but that customization completely breaks project B. So I end up fixing that for B but I've got drawbacks for A and so on.
As a general rule I adopted, I want to avoid as much as possible inline styles and css files inside the projects, writing all the style code inside the Design System.
I want to understand if my approach is fine or I'm taking the wrong path.
Thinking about "famous" design systems (AntD, Material, Bootstrap, ...) they are all abstract and it's the final application that relies on them, while I'm trying to develop on the D.S. what I need on the final projects.
Is there a way to improve my technique?
Related
I am new to Sencha ExtJS and Architect MVC, but I know MVC and some other JQuery libraries in general.
I want to ask when building a real-world system, what is the proper approach to layout an Sencha app structure in Architect 2?
For example, we have the following departments in our app, they have distinct functionalities:
Accounting, Controlling, Quality Assurance, Customer Services, Human Resources, Logistics, Purchasing, Sales, Records Management ...
Approach 1: Write them in different Sencha Architect projects. Stitch up with master layout page + main area + header/footer + side bar pages. (using MVC.NET in our case)
--- Pros:
Multiple programmers can work on different sub-projects in an agile
environment.
Each project is smaller and easier to be upgraded or replaced.
--- Cons:
We have different Sencha Architect projects for, e.g. main areas, side bar, header, footer. How do they collaborate with each other? We now only use JQuery to pass information between them, but it feels kind of hacky.
Approach 2: Write them all in one big Sencha Architect project. So, it sarts up in a single app.html page with everything in it.
--- Pros:
Now every component in the project can collaborate with each other.
A true Single-Page-App All-in-One app.html looks nice.
--- Cons:
Having hard time if multiple programmers are working on one Sencha Architect project.
It is one big complicated piece of app. Although it is seperated into simple App, Store, M, V, C categories, but we can have name crash on components in a larger project.
Loading speed may be an issue? I am just guessing here because we don't know if Sencha Architect MVC design loads relevant windows and compoents part by part or everything together.
Question is, if we take 1st approach how do we make communications between different projects? If we take 2nd approach, is Sencha Architech 2 designed to build real-world projects that way? stacking everything in one big project?
First I'll say that your thinking about this problem in all the right ways. Your pros and cons are spot on.
Second for full disclosure I'm an engineer on the Sencha Architect team.
My suggestion is to have separate projects that are more loosely coupled and perhaps connected by a portal/dashboard application. The glue app can be written in anything including Ext JS in Architect.
The reason I say this is simply that I don't like putting all my eggs in one basket and if you've built single page apps you'll know that when they're working they really hum. But when an uncaught javascript exception occurs it can force that user to have to do a full refresh to get back to a happy state. Of course if you're perfect this will never happen :p Who's perfect?
I build Architect which is in fact a very large single page application. As a team we all do our best to keep each system able to work with as little dependency on any other system(s) as possible. We use things like eventing, pub/sub, adapter and plugin patterns, etc...
These systems are very much broken into separate namespaces and directories which like all software helps developers compartmentalize. Architect doesn't fully support this idea today. However with convention you can get close. e.g. HRController, HRNewEmployeeForm, HREmployeeGrid
Having HR as a separate app however, affords you HR.EmployeeController, HR.NewEmployeeForm assuming your app name is HR. Each app being a separate project also allows for the dev team to be more agile in how it deploys!! Major win.
Other users have taken this approach and one such user graphs all his projects together using a managed iframe approach
http://www.sencha.com/forum/showthread.php?243179
Asp.Net MVC is another good approach and might afford you some features like user auth etc...
Hopefully this helps!
I'm starting to build a rather big application in ExtJS Architect and I was wondering if it is advisable to split the application into multiple projects (to be precise projects as Architect defines a project)?
At the moment I am the only engineer working on this application, however more engineers may be assigned in the future. What would be the points to consider if you would to like to split up the project in smaller pieces or build one big project?
In addition: as far as I know it is not possible to 'share' a project in Architect over more than one developer. That votes in favor for splitting the project.
Disclaimer: I have not used Architect to build a project.
My thought on the matter is that if you are building an MVC project and you want Architect to manage your controllers and views you should keep all of it together. Especially if you have cross cutting communications between modules. However if you are 100% certain that your modules are completely standalone - meaning they have nothing to do with one another and might as well be separate apps ... (maybe they should?) ... then you could build them out separately and weave them back together after you are ready to ditch the architect. Remember its a one way street not an IDE. Bringing the modules together should just mean that the app.js now lists all of your controllers for all modules instead of just one for your module.
My Application has the following structure:
myproject (primary Silverlight project)
myproject.Web (website for the app)
myproject.Controls (Class library so I could do some inheritance with controls)
myproject.Classes (Classes representing the data the controls bind to)
It seemed like a good idea having these split into projects with their own sub-namespaces, but I'm running into a lot of coupling issues and that is leading to circular dependency namespace problems.
From what little iOS development I have done, it feels kind of like I am trying to roll my own MVC solution here. What is the recommended way of going about having controls (essentially forms) backed by data in a Silverlight app?
The projects look fine provided the namespaces and assembly names match. You can do the following:
myproject.Classes Can reference none
myproject.Controls Can reference myproject.Classes
myproject Can reference myproject.Controls AND myproject.Classes
myproject.Web Can reference myproject.Classes, but shouldn't need to
I suggest doing that split within the primary Silverlight application itself (a single project with multiple folders). Unless you know right now that you will have to reuse the code within the classes and controls namespaces within different Silverlight applications, I would avoid it. Silverlight is UI, anything you will want to reuse should be in the ASP.NET part of the project (logic, db access, business rules, etc).
If you take this approach, your UI won't become an albatross around your neck.
Keep your Silverlight applications thin, fast and pretty - I promise you won't regret it.
EDIT: The downvote made me realize I was unclear (clearer, more concise version below):
Don't split your solutions into projects based on namespaces - it leads to needless complication. Use namespaces within projects to organize code. Keep project counts to a minimum, and only split when there is a compelling need.
Good Luck!
I am developing a silverlight application for the past 6 months using prism framework. When I look at the code base now it has grown huge with lots of modules, event aggregators, inter module communication code etc. On hindsight I am contemplating whether I made the right choice. Is there any other simpler framework I should have gone for ?
Prism is at its best when targeting a large application. Why? Because the core concepts Prism provides, such as Modularity, UI Composition, support for MVVM, etc. are used the most in this kind of applications.
The idea, as you said, is that you are likely to end up with a bunch of modules. The benefit of that is that your application is decoupled, and modules can be tested in absolute isolation so they are easy to maintain.
By using Prism, or any other library/framework that modularizes your application, (correctly) in large applications, you don't need to go through your entire application looking for bugs when you make a change to one of the parts. This is not true in monolithic applications, where making a minor change might bring down the entire app.
Another plus for Prism in this scenarios is that it allows multiple teams to work on different modules simultaneously, without affecting each other's work. This is specially useful when working with distributed teams.
The thing that would convince you of making the right choice, would be comparing the application you created with the same one but with high coupling of its components.
I hope this helps
I am currently working on a project of mine using Prism (the Composite Application Library/Guidance). The application will be a specialized MSPaint-like application for basketball (predefined objects for balls, players etc.).
Now I am wondering how to go about organizing my application into Prism modules. Especially when thinking about the drawing part of the software.
Should I split the general drawing view (2 columns: toolbox, canvas) in 2 modules (toolbox and canvas) or would the overhead created by the constant communication of these modules be too overwhelming?
How fine grained should Prism modules really be?
Thanks in advance and best regards,
crischu
There's very little overhead when you separate into modules.
I would go with what helps you organize your solution, rather than worrying very much about performance considerations. You can easily combine modules if you find they are causing you trouble or you are finding that two modules really belong together.
The rule is:
Make it run.
Make it run right.
Make it run fast.
In that order. Do what feels good first and refactor later if necessary.
I'd say it depends on how you distribute the functionality of your application over the UI. If you have just one screen, but with multiple sections that manage different features, each of that section (tab page, panel, etc) should have it's own module. This is the case with the StockTrader RI or NewsAggregator samples.
But on the project we are starting we decided to have multiple pages, one page for each major feature and to have navigation between them. In this case, a module will represent a page, nothing smaller than that.