I am trying to use Queue package of Laravel in Symfony 2. Are there are any resources that I can refer to that will help me to use Laravel package in Symfony 2.
Or perhaps some one have any prior experience in this subject that they can share....?
I suggest you take a look at Matt Stauffer's IlluminateNonLaravel project, at https://github.com/mattstauffer/IlluminateNonLaravel. In the public/queue directory, you'll find a detailed example on using the Laravel queue package in projects outside of Laravel.
Related
I am new to symfony framework so I don't have idea about bundles so I want to use third party bundles.
To get third party bundles as per my functionality I refer this and this links but I can't get full explanation about bundles like how to use , after install third party bundles where I need to change , which and where I need to configuration ?
So can anyone from symfony community guide me to how to use third party bundles ? and how to configure ? and where I need to configure ? configure mean routing.yml , config.yml file changes.
for ex : I need to install page building Bundle (CMS) for static pages (like about us , privacy and policy etc.) I install 3 different bundles using composer from git hub but none of are working. At last I install BeelabSimplePageBundle bundle and it install successfully in my vendor folder but on github there is not so much explanation about routing , configuration. may be some pro symfony developer can understand that explanation but newbie like me can't understand it because there is not step by step explanation.
so if there is any pro symfony developer please explain BeelabSimplePageBundle step by step and full explaination for install and for any third party bundle.so next time when I need to add any third party bundle I can do it myself and if needed I can explain to some newbie developer in future.
Thanks in advance.
Third party bundles usually comes with it's own documentation. If it doesn't you should avoid using it because it is going to make the development process harder and make your code buggy.
Only choose well documented and reputed bundles
Use the original documentation that comes with the bundle
In case you are needing a good place to search for symfony bundles, knpbundles.com has a large collection of symfony bundles
When I create an app using composer, or install another app created using composer, there is a vendor/symfony folder included.
For example, I installed Laravel using composer. The folder vendor/symfony is present. I am not specifically referencing this in my Laravel app at all.
What is this folder, and it needed? Does the app use it, or composer use it? So if I am using an app created using Composer and dont use composer myself, can it safely be deleted and the app still run? Or could the app be using it?
Thanks
Answer is quite simple: Laravel uses Symfony components.
Check this article: http://www.sitepoint.com/build-php-framework-symfony-components/
Improved Routing Engine
Laravel 4.1 features a totally re-written routing layer. The API is
the same; however, registering routes is a full 100% faster compared
to 4.0. The entire engine has been greatly simplified, and the
dependency on Symfony Routing has been minimized to the compiling of
route expressions.
http://laravel.com/docs/master/releases
The "vendor" folder is a standard in every application / framework that uses composer to manage dependencies. In the "vendor" folder you will find all dependencies (read: libraries) that your applicatication requires.
But you will also find all libraries that your libraries require. In order to minimize code duplication, and thanks to the composer system, most open source projects now reuse parts from other open source projects.
BTW, this is great.
Symfony components are excellent and well documented, so they are currently used by many other frameworks and applications.
Inside the "vendor" you may find other libraries that you did not specifically require yourself, but as long as your correctly use composer, that's not something you should worry about.
I tried to use the scaffolding but there are so many changes I need to make for it to meet my needs. Is there some way I can make my own template so I can scaffold my own controller automatically.
Please note I just updated to the latest release of VS2013 RC Update 2. Not sure if there is any new functionality in that which would help me.
thanks,
There are two ways that customs scaffolders are supported:
Write a new scaffolder as a VSIX extension. This will be available for any project on your machine, but does require installing the VSIX to share. A sample walkthough is provided here
Customize the scaffolding T4 templates for your project. This will be available only in the project where you do it, but should not require any further custom installation once it's there (note: setting it is simplified by having the SideWaffle extension installed). A sample walkthrough can be found here
Never done it before, but this may help http://blogs.msdn.com/b/webdev/archive/2014/04/03/creating-a-custom-scaffolder-for-visual-studio.aspx
I need some pointers/suggestions on following scenario.
Scenario:
We are trying to use JDBCTemplate in CQ 5.5 for querying database (Oracle 11g). As first step we have integrated CQ with Spring Framework. Now for JDBCTemplate to work it requires JDBC driver that needs to be loaded separately into CQ as it is not available with Spring jars. The jar that is required is available here http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html and jar in my case is “ojdbc6.jar” that contains OracleDriver class (JavaDoc: *http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html*) required to register the driver to create connection with Database.
Problems/Suggestions required on following points:
As oracle 11g is commercial product so there is no repository available online for it (for pom dependencies), we need to create a separate local repository for it. (Need pointers; is there any other way to do it?)
Jar mentioned above is not OSGi. So how to approach in that case? (I have created OSGi bundle by following directions mentioned here http://cq-ops.tumblr.com/post/21893960212/how-to-turn-a-jdbc-driver-jar-into-an-osgi-bundle-jar)
In this process of converting this jar to OSGi Bundle I have to remove versions mentioned with Imported Packages in MANIFEST.MF file. (As I understand that CQ by-default picks the latest version that is available for any class, there may be problem when a new version of any class is available that is not compatible with current version. Need pointers; should this be looked into priority? Has anybody faced any issue due to this in any project)
Current Status:
By converting ojdbc5.jar to OSGi bundle; I was able to use JDBCTemplate. But looking for some pointers to check is there any other approach someone has followed in other project to achieve scenario mentioned above?
The oracle driver is not published to any public maven repo. So indeed you will have to put the jar into your own maven repo
In Apache Karaf there is a nice feature where you write wrap: in front of a bundle url and it automatically creates a bundle on the fly using the bnd tool.
If CQ does not have such a feature then you will have to create the bundle on your own. In this case the maven bundle plugin can help you. You can depend on the oracle jar using a maven dependency. Then you can define exports for the packages of the oracle jar. Bnd should then automatically inline the classes in you bundle jar. Another option is the maven shade plugin. You can take a look at the source of the servicemix bundles. There you find poms to bundle a lot of plain jars.
Not sure what exactly you mean. As far as I know the oracle driver does not have any external dependencies.
I have written a DB tutorial for Apache Karaf that explains how to deal with the oracle driver and how to create data sources without depending on the concrete driver.
The solutions in the tutorial can not be used 1:1 in CQ but it will surely give you some pointers.
I can add a package to a custom checkout of meteor as outlined in How to build a Meteor smart package
But this doesn't really work when developing with others.
I'm wondering if there's a way to do it within a project? A-la the old Rails vendor/plugins? If not, perhaps it could be something the devs might want to implement..
If you need others to use your package but you don't want your package in Meteor, then you could just fork the Meteor repo and work on your fork instead of Meteor itself. That way, the others can clone your repo instead of Meteor...