I am trying to find a documentation or a tutorial about creating and publishing symfony2 bundles for other developer use.
I tried to look at some source code for some public bundles but it seems it needs more in dept understanding.
Is there any official documentation about this ?
You can find most of the recommendations from the official symfony documentation : http://symfony.com/doc/master/cookbook/bundles/best_practices.html
I also encourage you to read this slides from the famous #stof70 and #lsmith, that exposes the most recent best practices about bundles (composer, travis, knpbundles, etc) : http://friendsofsymfony.github.com/slides/there_is_a_bundle_for_that.html#1
There is no official documentation on this topic. But from my point of view I can tell you, that most important things for you bundle are:
Uniqueness
README
Tests
Avoiding dependencies
Good practice also is to tag stable releases.
By the way, at KnpBundles you can see the number left to the bundle name. It represents respectability of bundle within community. You can check most respectable and the looser ones, compare and analyze them to define points, that make bundles successful.
Related
I have recently started learning about Alfresco Content Service.
I have some questions:
My understanding is that the standard way to add customization is to create AMP's.
Why create an amps for each customization instead of adding it directly to the configurations of ACS? Are there some benefits like not having to restart the service or something?
If apply_amps adds all custom amps to the alfresco server (.war files), won't there be a risk of customizations writing over each other?
E.g if two different amps change the same standard button in the share service.
I have found that there are 2 ways to add these customizations as well:
Add dependency to the pom file. (works only for .jar)
Actually compile the .amp and move it to the correct folder and run apply_amps.sh.
From the documentation it seems to my like AMP-files used to be the standard way of adding customization but that there have now been a move away from this in favor of using regular jar files and eventually in 7.1 and forward use JSON instead.
Yet other tutorials I find mentions things like "always use .amp". Which then seems strange if it contradicts the information on the official documentation.
Also I found something about adding amps through the share interface? Or must they always be added when building the server (.war)?
Could someone provide me with a thorough explanation of the best practice for applying customizations to the alfresco content service? Preferably with details regarding a live production setting.
Thanks for helping me make some of this clearer.
I'll try to give you helpful answers:
Making app packages (APMs or JARs) is much better than changing config manually. It's good for versioning, portability (TEST vs PROD or between projects), composition (you can add some addons witch are often very useful)... It is standard and good way how to build a web app.
About conflict of customizations, I'm not sure how it works. Is good practise always use own namespace for every AMP.
If AMPs write to the same file, result is always append (share-config-custom.xml can get be very big).
Problem about JARs and AMPs is simple. Old version of Alfresco supports more AMPs than JARs. Now it does not matter with way you use. Try to look inside these packages they look very similarly.
I never heard about adding AMPs through the share interface. Have you some source? Only thing which is similar is creating content model through Model manager (https://docs.alfresco.com/content-services/latest/tutorial/model/)
I use for PROD combination of AMPs and JARs. I have a lot of legacy code and addons in AMPs and new things in JARs. Alfresco work with them same...
I just started with symfony 4 and have a question about "multi-controller", if my application got many routes, should i go for more controllers to keep the files tiny and readable or is one controller enough / recommended?
There is no recommended way about multi-controllers on the official documentation.
If multi-controller is a good choice, how to split?
If there a good documentation on the inet?
Absolutely yes, you should have more than one controller. Symfony's best practices recommend to keep your controllers tiny and delegate much of your application logic to services that you create to handle different actions. For this, it is essential that you have a basic understanding of Dependency Injection, the Container pattern and, more specifically, how Symfony's DI Container works (how you can register services, for example).
There's tons of documentation on Symfony in the intenet. This one on controllers.
KnpUniversity has some really good tutorials to get you started. Start with the Symfony series, then follow with Symfony Internals.
Also, you will greatly benefit from the features of the maker bundle, that will generate code for you really quickly. You can install it with composer require maker. Then, you can create a controller running php bin/console make:controller.
I'm starting with Symfony3 and I have two beginner questions:
Is there a good repository for Symfony Bundles? I found some, but they all lack a category system. Is this a downsite for Symfony, that you have to scan all bundles in their sourcecode?? The names and supershort descriptions tell you almost nothing about the bundles...
I've tried to join the https://connect.sensiolabs.com community but somehow I don't see anything. I just can edit my profile. It says "profile completion: 50%" and asks me for some more accounts on Github etc. (which I don't have). Am I missing something? I thought there will be a nice board etc.
http://knpbundles.com/ contains thousands of bundles to use. Also https://github.com/FriendsOfSymfony have awesome bundles.
Usually whenever you want to do a feature you'll google bundles that support this feature. Hence the name gets relevant.
We are going to build something like cratejoy.com, but don't want spend lot's of time building which is already builded before for developers.
I was going through sonata and sylius, but not sure if we can build subscription based model with one of them. If yes we can, then which would be best to use? or should we just build complete custom solution, because it involve b2b solution.
What we will be building?
Basically e-commerce software like any os-commerce shopping system, but the only difference is, we will be adding subscription on each product.
So let's say, if you order a product, we will ship it to you every month to your door step.
but we are building this as service, so many people can just create their site and start using our tools to start selling there products.
I might be a little biased towards Sylius, as I work with it constantly - I've tried using Sonata bundles in projects before but failed in making use of them.
Reasons for using Sylius are that it's heavily decoupled and customizable, which is exactly what you want if you need an e-commerce solution that is not the conventional "add product to basket, pay for it once" model.
There are two approaches you can take to use Sylius: Either use the full stack application and customize it, which is the most common approach and better supported. The other approach is to install Sylius like a library rather than an application and build the application and frontend yourself, using Sylius classes and services when you need to (which is what I do).
Things to be careful when using Sylius are that it's still in beta, with breaking changes occurring between releases. Also the documentation is very incomplete or outdated (something I plan to help improve), with the exception of Resource and ResourceBundle - these packages are the most important part of Sylius and are therefore very well documented. For your project, I recommend the first option.
For subscriptions, areas of Sylius you want to look at configuring and extending are OrderBundle, PricingBundle and PaymentBundle. If you're very familiar with Symfony, this should be straightforward.
I am new to SilverStripe.
I would like to know a good place where I can start making modules for SilverStripe; some good tutorials to get me started.
A SilverStripe module can do practically anything, so it's hard to say where to get started.
The following Wiki page has some very basic startup information:
SilverStripe Wiki - Creating Modules
Beyond that, I'd recommend reading up on how to use ModelAdmin to create simple administration interfaces in the CMS, and maybe take a good look through the API Docs to get an idea of what is available to use.
However, there is nothing fundamentally different about modules as there is about any other site functionality (or even themes) - it all uses the same API and structure - so maybe download a few popular modules to see how they're built.
Finally, SSBits is also a particularly good tips & tutorials website for SilverStripe, and the SilverStripe Forum and IRC channel are useful too.
I recommend the SilverStripe book "The Complete Guide to CMS Development", you can find it at Amazon or view it online at Google Books, it is not a complete reference but a good start to module development.
It has many examples, using a complete example project (with downloadable code) and some additional recipes for frequent tasks.
Here are some more up-to-date resources...
Module structure:
http://docs.silverstripe.org/en/developer_guides/extending/modules/
Publishing modules:
http://docs.silverstripe.org/en/developer_guides/extending/how_tos/publish_a_module/
SilverStripe video lessons:
http://www.silverstripe.org/learn/lessons/
If you're still unsure, I can recomment the book "SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide" - targeting the current SilverStripe version.
Disclaimer: I'm the author of the book, but given the title it should fit your requirements well...