Order / Priority of development in Symfony - symfony1

So I've decided after much debate and research to use symfony on my next project. To sum the project up, it is an LMS (Yes, I know there are pre-built ones such as moodle but they do not have what my particular company requires). There are many modules and issues to take into consideration. My question is in what order should one start with Symfony?
Note, the database is already made and populated with data.
The Doctrine ORM?
User Authentication?
Creating the Core modules? (Courses, Enrollment, Grades)
Page security (i.e. installing the rules for who can access what page)?

Checking out the Jobeet tutorial is good advice.
If the database is already built, I would probably do something like this:
Ensure you have a plan of what "objects" and functionality the site is to have (eg. list of courses, course detail page, course search, etc). You should be able to visualise the site and have some design mockups ready. It would also help to know whether it's going to be multi-language or not.
Generate Doctrine models & form classes on the back of your db
Create home page placeholder (probably a module) and a logged-in home page placeholder (probably a module) + basic layouts for further tweaking later.
Create signup & authentication processes (so you have the core functionality of adding users, signing them in and signing them out). Use sfDoctrineGuardPlugin.
Now, start creating core modules one by one according to your plan. As you progress, you'll notice what bits make sense as partials/components and where an additional module might make sense. Add new routing rules as you go along.
Finally, add any little bits, cleanup your template HTML/CSS, JS files, etc
... this way you have a work-in-progress site that you can play around with as you go along.

If I were you, I would try to follow this tutorial : http://www.symfony-project.org/jobeet/1_4/Doctrine/en/ You can certainly match each step of the tutorial with a feature your website has.

Related

A pre-built extendable web application for Rails?

I am wondering if there is a standard pre-built web application for Rails which has all the basic functionalities like user login, user profiles, profile image uploader, comments, search, maybe payments and a set of other usual web application features all bundled and ready to use and extend.
I like how Twitter bootstrap comes with a set of pre-built interface functionalities and styles, which you can start using and modify later. I am looking for something similar that can allow me to quickly set up a working application and go from there.
Does such a framework exist?
There are numerous examples out there.
However, there are two things you should really do:
Read the license to make sure you can use it they way you are thinking of using it.
Ensure you understand the design decisions and choices the original authors made. You will end up in a world of maintenance pain if you just copy cargo-cult style without understanding the tradeoffs others have made with their design decisions.
Any one of the links listed has enough to get you started. They may not have all of the features you listed but together they probably have all of your bases covered. You will have to put in some effort to get all those features working together though.
The RailsApps project is great because they all have tutorials that walk through the basic setup. They are also all built using the Rails Composer tool, which lets you pick and choose certain options for your app.

Symfony admin generator: To be or not to be?

on the last projects i've started, I wondered if I should use the admin generator or not. My usual choice is to not use it, as some developers suggested to me, "unless it's for quick backend prototyping and submission to client", they said. Currently i'm starting a project and i'm in the situation that the client need the backend very fast to start loading lots of data, and i'm doubting about using the admin generator or not. I would use it if needed simple form fields. But one of my models must have multiple images, and maybe I need a more complex view that allow the client to load N images, so the admin generator maybe it's not the best choice, but it seems fast, it seems to save time and that's what I need now, time saving!
The project is very simple, it's just a Product model with multiple images and multiple sizes and belongs to a simple category.
What do you think? What would be the best option for this? And where do you think that makes sense to use the admin generator or the regular module generator?
Thanks in advance!
Regards.
I use the admin generator as much as possible. It is really designed to be great for the "backend" of your website-- the administrative screens which authors and editors will use to maintain the app. Any module that needs to be user-editable and is simple cries out for the admin generator.
Recently I have been starting everything with the admin generator so that there's a working prototype to build data with. Then I select certain modules or views that need more magic sauce, and build them out with more customization.
Remember, you can add views and forms to an admin generator module. On my last project I used the admin generator for the "edit" action of my main object but added "show" methods similar to a non-admin-generator form-- adding an executeShow() action and showSuccess template.
The other thing to keep in mind is that the admin generator is only a generator. It writes a bunch of code for you in cache/frontend/env/modules, but you can override any of it by building the equivalent code in apps/frontend/modules/. If you find one part of it that you can't configure with generator.yml, you can copy the file out of the cache into your module dir and hack away. I prefer to take the "out of the box" admin generator as far as possible before customizing it, though.
i've been working with symfony for quite some time now and i've been using the admin generator for simply and complex situations. It's true that it saves time when developing CRUD modules, but i dont think that is not advisable for complex cases.
I think you should use it and also learn the power of customization the generator gives you. If you have complex Forms, leave that for form classes to manage and as you said, if your forms a quite more complex to render, well you should only take care of the rendering of that only segment of the view.
But, if you decide to make if without it, you should start thinking about creating all the view from scrap, that in my case takes quite time ( i'm not so versatile wiht css).
But this is only my opinion, hope this helps you make a more rational choice!

Simple Framework or CMS for a trading platform?

I have a relatively simple site on my hands, and have for nearly a year, but I can't seem to find a platform to build it on that doesn't fight back at the way I want to do things. Here are the key features:
Customizable profiles. Profile tags.
Two primary content types: Haves & Wants
Both content types searchable/taggable and expire with a "Taken" symbol if user chooses.
Private messaging.
Daily cron attempts to find matches of Haves and Wants with similar tags and uses email alerts.
I think I can understand the logic of building this in Rails... but I'm too much of a noob to execute it. Is there a easier framework or cms out there that can produce something like this?
Additional information: We currently are using a modified version of the Classipress template for wordpress. It got us a little ways through development... but we can't seem to convince wordpress to post more than one type of content or tags. http://mybarterhub.com/
I wouldn't attempt something like this on Wordpress (not what it was designed for), but any of the frameworks you mention are more than capable. Have you looked at Drupal? I think it hits a sweet spot of allowing you to do a lot without actually programming, but also allowing programmers to customize it heavily through modules. It has a lot of the community and taxonomy features you need -- either built in or available through common modules.
If you're unable to get too deep into a framework like CakePHP, I would say Drupal is your best bet. Drupal is pretty non-coder friendly, but if you're going to make it work for projects that are more complex than out-of-the-box type situations, there's a slight learning curve.
There's at least one module that lets you use a custom Content Type for the user profile, which should allow you to tag profiles (the profile content type nodes) using the taxonomy module. Users in Drupal aren't nodes, so I'm guessing that's why tagging them wasn't working for you.
As for searches, all content should be indexed and searchable in Drupal as long as it's set up to do so. I'm not sure what modules are available for specifically searching by Taxonomy term, but, if you're using a tag system and you want to present haves/wants by tag, that's easy enough to set up with the wonderful Views module. A while ago I think I set up views that mirrored the taxonomy vocab/term structure and just redirected to the view using a Taxonomy Redirect module when someone clicked on a tag.
I think that if you can't make it work in Drupal for some reason (or you really don't like Drupal), you'd have to get into CakePHP or one of the other frameworks out there, but Drupal is definitely able to accomplish what you're aiming to do, probably without any custom PHP coding involved if you got all the right modules together.

New Rails App - Handling Account Settings

I am building a new Rails-based application that will have Basecamp-like accounts for each subdomain. Each account (client/customer) should be allowed to store different settings such as a color scheme, their subdomain, their preferred authentication mechanism and so forth.
So, how should I handle the settings for each account such that I can easily add new settings later that apply to all accounts? Examples or ideas of how to build the objects and relationships (i.e. many-to-many) would be great. Additionally, if you have any good articles, I would greatly appreciate a link to those. This app needs to be highly professional and I want to make sure that I get some of these basic things right before I jump into the remainder of the project.
Thanks very much!
This question addresses a similar situation. It's worded a little differently. But if you map the question's description of a product to one of your subdomain it still feels pretty relevant. You're not explicit but with the comparison to basecamp I'm assuming that each subdomain will have it's own set of users who also have their own settings. Settings that might not be global to your application. The linked question address that too.
I see this working best as a single table for subdomain settings.
With an index on a column linking it to a customer/client/userid, another one linking it to a subdomanin.
Each option that effects subdomain design gets a column in this table. On page load just look up the row for the subdomain in the table in a before filter and things should go relatively smoothly. Adding new global options are simple. Just graft another column onto this table with an appropriate default value.

Getting started in Symfony... flow of CLI operations, etc

I sure hope this is an ok question to ask here. I realize it isn't a specific programming Q, but hopefully it does have an answer.
I've been trying to learn Symfony (PHP framework) and I've gone through the Jobeet tutorial as well as read through the massive "Book". So I sit here about to begin my first project and amazingly find myself absolutely stuck on what to do. I realized that after reading all that... that I didn't "get" what the overall flow was. I'm asking this here because of the WIKI style so this can be adopted by experienced symfony users and melded into a final document that myself and other symfonewbies can use.
I'm beginning this from the point of view of a Windows user with a local server setup and the folder(s) containing php and symfony executables have been added to my PATH environment variable. I'm also using the assumption that Doctrine is being used rather than Propel as it has been stated in the docs that the default setup will be Doctrine going forward.
Create a folder for your project. Open a command line (in Windows, Start -> cmd.exe) and use the generate:project command to make the skeleton.
I'm really already lost here. From the Jobeet tutorial it seems to suggest the next step is creating your database in schema.yml and running doctrine:build-all? Or does generate:app and generate:module etc come first?
and so-on.
I'd appreciate any symfony pros out there contributing. Thanks.
Come up with a concept
First of all think of an interesting project that you would like to build. The default for this kind of project is usually a blog, but if that does not float your boat, how about something like a twitter clone or a reddit clone?
Build your model
In Symfony, the thing to do now is build your model. Create it in either a schema.YML file or in a graphical product like DB Designer, MySQL Workbench etc.
You need to add the tables, columns and foreign keys so that Propel can build you an interesting model to play with.
Let symfony build your apps
Now get on to the Symfony command line and create a couple of apps. A frontend, for the web and a backend to manage the site as an administrator.
Now let Symfony generate your model based on your schema. The lib/model folder should now have a load of files, filled with some useful functions based on your model.
For your backend app, generate a CRUD system with the admin generator and customise it with the yml file provided. Follow the myfirstapp tutorial for some interesting additions for the CRUD site.
Go in and edit your freshly built site!
For the Front end, create a module for each of the major parts of your site. These may include users, articles, tags, comments, stories, links, votes etc etc. Once you have some modules set up, the real fun starts. Create some functions in your actions file (such as list, show, delete, update) and create corresponding template files to display the results of the action.
Each action you create is automatically mapped to a corresponding URL.
http://yoursite/module/action
Hope this gives you some inspiration!
Follow the process in the jobeet tutorial - you've said that it suggests creating/defining the model is the next step, its what I always do.
Then create some fixtures, then go generating applications/modules etc. Once you reach this point, there's less need to stick to the order jobeet does things, but its still a good reference.

Resources