For a mid sized application that makes use of MEF catalogs is there really any advantage in my using Prism modules rather than just putting the different functionality into different class libraries. I just can't see why I would need to use Modules.
Anyone have any thoughts on this?
Thanks,
Richard
Modules are used when you want to perform initialization actions when the module is loaded. This can be for example the registration of views to regions using the Prism IRegionManager interface.
Whater PVitt Saying is correct plus i would like to add to it.
Modules are always a good option for the scalability.
you can easily do future enhancements by having Regions,each region having some view associated with it and each view in different module.
when i say each view in different module it means you should find out which view is having some other view related to it and make a clubed view of these two views and have single module for these views. after all its your call.
for e.g.consider your application has a menu.Toolbar for each menu item is same i.e. having same functionality then you can have ToolbarView+Menuview inside "MenuView".MenuModule will have this final MenuView.
So my opion is go with modular approach if you have any future enhancement or if your project is going to change time to time like new functionalities on user demand etc.
Modules are a wonderful way to allow multiple development teams to develop at the same time. Also assist your to organize and maintain the Single Responsibility principle of SOLID principles in a Project level.
It helps your to have separation of concerns.
Related
I'm total newbie with Laravel, so the question might not be the most intelligent, be gentle, please.
I'd like to use an Open Source application made with Laravel. However, the application does not fully suit my needs, hence some customization is needed.
Naturally, I don't what to change the application files and also want to keep all my files separated.
In other PHP-based applications there are typically methods to customise the app without touching any other code. Also, it is possible to have own code nicely in one place. For instance, Wordpress has a theme concept, child theme concept, plugins and hooks in code (filters and actions). In Magento we have a simple method of overriding a core file by copying it to local code pool, as well as a more sophisticated dependency injection, which allows to override any class anywhere.
I've been trying to understand what is the correct way to customise a Laravel application in such a way, that my own modifications are separated from the base application and e.g. updating the base is possible.
Please guide me, or give pointers on how to do this.
Sounds like Packages might be your best option.
https://laravel.com/docs/master/packages
They let you customize very much in your application without touching other parts of the code, as well as keeping it separated from the other parts of the application.
Here's a getting started guide on packages:
https://medium.com/#lasselehtinen/getting-started-on-laravel-package-development-a62110c58ba1
Assume you have to develop an app, which needs a completely customized user interface so that you can not use any standard UI objects in Xcode.
How would you proceed to create such an user interface? Would you use the interface builder? Would you create something like a master parent UIView? What are the best practices to achieve this?
What would be the most elegant solution with less code duplication?
If by "complete customization" you mean the look and feel of the app,
then I suggest to design the IB objects you require using some design IDE's such as photoshop and then use those slices for your project.
This is the best option I find so far to get a complete customized look with minimal code, and by minimal, I mean you don't actually require any coding. You can do this complete customization within your Interface builder.
However, I don't think you can completely ignore standard UI objects as you require them to add basic functionality.
If customized controls are what you are looking for, then I suggest you to create separate custom control classes so that they can be reused anywhere in your project, or in other projects too.
Here are two wonderful tutorials on custom controls:
http://www.raywenderlich.com/36288/how-to-make-a-custom-control
http://www.raywenderlich.com/56885/custom-control-for-ios-tutorial-a-reusable-knob
Hope this helps!
I have used backbone boilerplate on the past
https://github.com/backbone-boilerplate/backbone-boilerplate
I want to use marionette on my next project and I have found this
https://github.com/BoilerplateMVC/Marionette-Require-Boilerplate
My question is if it's a good idea to go with the marionette boilerplate or start form scratch.
As an aside, I'd like to suggest you give Yeoman a shot for scaffolding your first Marionette app. Yeoman works via what are called "generators", and provide much more than the the above Boilerplate MVC can offer you (Chai and Sinon for testing, Bower for client-side package management, etc...). Plus, Addy Osmani, who runs backbone-boilerplates is one of the heads of the project. Check out generator-marionette here.
I haven't used BoilerPlate, but glancing through it, it certainly seems like a valid approach to writing Marionette apps. If you're just getting started it will certainly help you see how the various pieces are supposed to be used. One gripe I've got is the folder structure. I prefer to break my applications down into modules, and then add models, collections, views, etc under each module. But this will certainly get you up and running quick, and there's nothing stopping you from customizing it to suit your needs.
I agree with others here: it is a useless limitation to imitate a folder structure that follows the 'old mvc model for server-side code'. You will remain more flexible further down the road if you think of your application strictly as completely self-containing modules, i.e. they contain their own controller/router/views/collections/templates etc. You can have a separate folder structure for shared code that is not a module, although anything can be made a module :)
Regarding boilerplate code and generators: i think in the beginning you should actually NOT do it, because you won't understand what you're doing. But that's just my personal opinion.
I have been learning to develop my own plugins and components for joomla! 2.5.
After a couple of months of developing features for my site, I am starting to realise that some of the components I have created could have probably been just as effective if I'd developed them as a plugin for com_content or com_user.
My question is what's the best way to decided if a full component is needed and when is it ok to use one or multiple plugins to give the same functionality.
My feeling at the moment is that plugins are a much nicer way to go due to them being self contained. Maybe I've answered my own question, and components are needed when interaction between elements is more complicated, where as plugins can be used for very modular functions.
Anyone else have a view?
Components and Plugins are completely different types of extensions.
Components are applications/systems that will appear in the content area such as VirtueMart and where the articles are shown. Consider them as software for you computer.
Plugins are there to manipulate Joomla and/or there extensions it's using. They contains functions that are associated with trigger events. So in a nutshell, they are there to extend the functionality of an existing extension.
So so answer your question, have a think about what you are creating and if will be an aplication or something to extend functionality.
Hope this helps
I am trying to find out if I am thinking about this correctly. My goal is to be drop in a dll and have access to helpers, and partial views (Maybe Views too), using an MVC pattern. I have been treating Areas as modules lately using #RenderAction to serve me up some partials when I need them anywhere on a site. I can copy that whole area out and reuse it on another site, but that means changing namespaces on each file and it's duplication of the area so I am not getting to update it in one place for all sites. I am open to ideas and thoughts if I am approaching this incorrectly. For clarity's sake, here is my question: Is there a way to isolate only an area and compile it in it's own assembly? If so why is there not a new project type for that? Like add->new->module?
Thanks
You may checkout the following article which illustrates a nice technique allowing you to embed razor views into a separate assembly as embedded resources.