Pimcore Exam Routing - pimcore

I've got a question for pimcore. What are the possibilities to make dynamic routes for e.g. for an object detail page?
In my opinion I can achieve this with Custom Routes/Static Routes and the Symfony Routes, right?
At the moment I stuck at the exam course and the above answers are incorrect.
The question is: what are the options for creating dynamic routes for data object detail pages?
Smyfony Routes
Url Slugs for Data Objects
Pretty Urls
Static Routes
I've tried so many variations and all are wrong.
I've read through the documentation and the pimcore own community. I think the expected answers are wrong. For me it is important to understand what is right and why.

Should be
Smyfony Routes
Url Slugs for Data Objects
Static Routes

Related

Web application (API and Front-end) - routes design

I suppose this type of topics always exist, but i like to have an specifics opinion for my case.
Since 1/2 month i'm thinking about make a listing web application for my daily life (shopping, due, etc.)
I started out define my object model like this (very simple design model)
Models image
So, i decid to create a NodeJS API for back-end, and Angular 7 for front-end. It's not a technical problem for me to develop the application and the API, but my problem is in the design of this, and particuly to the routes design.
My first suggestion for routes API is :
User :
/users
/users/:id
List :
/lists
/lists/:id
Element :
/elements
/elements/:id
Technicaly it's ok, but i'm not sure it's the good practices.
As User contains List and List contains Element, Wouldn't it be better to have routes like this :
/users/:id
/users/:id/list
/users/:id/list/:id
/users/:id/list/:id/element
/users/:id/list/:id/element/:id
Thanks for your answers, or suggestions !
PS : If you have any web sites / video / topics ... to suggests, do not hesitate.
I'd say you got it OK in the first place, the second approach is messy as you can get huge routes, and you're sending a lot unnecesary data. Why do you need the user id to get an element? An element is an entity by itself, and it will probably grow, you may need to get related elements, filter them... its better to just have /elements
What you can do is find simple relations, like:
/users/:id/lists
/lists/:id/elements
I'd recommend reading building apis you won't hate :)
Firstly you are in absolute correct path of defining Routes in angular, at the same time you have to use Lazy loading concept of Routing.
I would recommend you to, go for plural sight course , by Deborah Kurata. I'm not trying to promote or advertise anything but for your current situation that course would be the right guidance. It would provide you all the necessary things that you need to build enterprise ready apps.
Alternatively Core UI Angular provides some best designs which are already implemented with Angular Route and things. Lazy loading and other Angular routing are implemented, all you need to do is understand it.
Hope this helps.,
Principle
as short as possible
easy to read
user-friendly input when the user enters the URL
Examples
User list
/users
User detail
/user/:id
Add user
/user/new
User's functional page
/user/:id/tel

MongoDB Permalink Schema Design / ExpressJS implementation for RESTful routing

I am new to mongo, and application design in general, having simply used gems in the past to handle my permalinks (coming from a rails background). I was wondering how best to handle permalinks.
Should you have a collection in mongodb, that links permalinks to their object ids, or is it better to pretty much replace the object id with the permalink acting as the uid? Or should there be some kind of combination of both, where the permalink is simply used in the router and then ids are used in the application internally?
Also some advice on how best to implement these in the application itself as well as the db would be great, I am using expressjs if that's any help.
Thank you.

Can Express routes be used as MVC Controllers in Node.JS Apps?

I have been playing around for a bit on Nodejs, so forgive me if my question might look stupid.
When I setup a new nodejs app with express, I noted that it created a folder /routes that basically does what it suggests.
Now, is it ok to use said file(s) as the Controllers for my app?
I think so. Because role of a route in express is to decide what to do when a certain request comes, such as getting data from a model or rendering a view with some data and this is what controllers do, right?
You can see in official examples that routes are actually placed in a folder named conrollers.
https://github.com/visionmedia/express/blob/master/examples/mvc/controllers/pet/index.js

Need help understanding the Route attributes in ServiceStack

I'd greatly appreciate if someone could kindly explain [Route] attribute / routes.Add() method, its parts. I'm used to MVC framework / WebAPI and know that those pertain to Controllers and Actions. For instance the classes, DTO objects have them as opposed to methods. Thanks a bunch in advance.
Update 7/17/2013
http://pluralsight.com/training/Courses/TableOfContents/service-stack
Excellent course that answers everything
The route attributes you are referring to routes specific dtos to services based on the path in the route. so something like base.Routes.Add("/files", "GET,POST") would allow GET and POST requests to the /files path. So if my api lives in /api I can hit
http://localhost/api/files
with a GET or a POST and it should be routed to the correct service(s). You can think of this like what mvc does and keep in mind that mvc WILL mess with teh routes of service stack if the path is not ignored in mvc. In your route config of mvc make sure to put something like this:
routes.IgnoreRoute "api/{*pathInfo}"
assuming you installed service stack to run on the path /api (this can be found in your web.config). Also, if you are using mvc4 i would recommend taking out the webapi stuff so you dont get any conflicts with that either.

Node.js and Express.js Layout

Would this be an acceptable layout for my express application structure
models
Mongoose Models and Schemas for the Application
views
Jade template files
routes
Routing files
controller
Form Handling and API Handling (POST/JSON)
If this is not the best way to structure an application, what is, are there any examples?
Thanks.
Here's an example directly from the Express code examples.
Likewise there's a question here about this same topic.
Note that Express has several potential uses, so there's limited prescriptive guidance here.
Try express-orm-mvc
A simple package that support express and orm with mvc template

Resources