TYPO3 | Extbase | Domain Model | Lifecycle Hooks - extbase

After hours and hours where I searched the whole universe for an answer, I decided to ask you clever guys again.
I' working on Typo3 6.2.
I've written an Extbase extension including domain models, which is working fine.
Instead of custom backend modules, the domain models are managed by the list module shipped with Typo3.
One of those domain models contains a property which has to be filled when the object is created/updated. After alot of research, I was sure that the signal dispatcher is my way to go, but I failed to get it triggered in any way.
So my question:
How can I register a "callback" which is called when an Extbase domain model has been created/updated using Typo3 6.2?

Related

Route::controller() in Laravel 5.3

We have completed an end-to-end E-Commerce platform using laravel 5.2.x.
The project was started in January 2016 and we are in the final stages.
Have used Route::controller() method on almost 100+ routes. Changing all these into explicit rules at this stage is really painful task. At the same time we would like to upgrade laravel to 5.3 and use its benefits such as broadcasting.
I just want the controller method back. Is it something that we can extend the router class to 5.2.x's controller method?
Yes, removal of Route::controller in Laravel 5.3 was a big step back, and was a result of misunderstanding of this advanced feature.
To fix this shortcoming, and without increasing needlessly complexity, I created a class called AdvancedRoute, which registers the controller routes. It can be used by simply replacing Route::controller with AdvancedRoute::controller
Full information how to install and use find at the GitHub repo at:
https://github.com/lesichkovm/laravel-advanced-route

jax-rs url inside an ejb module

I created a tutorial that incorporates various components of J2EE in them. The app is an ear module that has an ejb project and a web project.
the project structure is
john-app
john-ear
john-ejb
john-web
the ejb project has a couple dao that perform basic crud operations using jpa. I'm trying to learn/understand jax-rs to gain a better understanding of json and handling json objects. the project is loosly based on
this project:
http://www.developer.com/java/creating-restful-web-services-with-jax-rs.html
so, i created my BookResource here and made it a stateless ejb. i have everything compiling and deploying without any obvious errors - other parts of the app work (the jpa stuff) but i can't get the jax-rs stuff to
work. i have a couple of"Books" that I created in my database and am wanting to test this by making a rest call through the browser.
so i deploy my .ear file in wildfly (v10) with no obvious errors, I see JNDI mappings for my EJB's...etc
initially, i'd like to be able to test this through my browser, but am not certain what url to use -- the class i have extending javax.ws.rs.core.Application has an application path of /rest and my
BookResource has a path of /library, and for getting all books from the library, the sub-resource is books. I've tried every combination of the url below,
http://localhost:8080/john-[app|ear|ejb|web]/rest/library/books
all to no avail. every call results in a 404 error, and the only time i got ANYTHING is when i tried john-web combination, it threw some ugly exception in the browser. so the questions is with a rest service living inside an ejb module within an ear, what should the url be given the above information. nothing i've tried
seems to work!??
I've not included any code samples to try and keep the explanation short -- i didn't want to include every java file in my little project, but can add anything as requested.
Thanks,
JG

spring based bundle in apache felix osgi

I am working one POC where I want to create plugin based web application. Main application will have all the spring mvc context. Plugins can write spring controllers but they cannot have their own spring context file. What I want is when plugin is installed all its controller is scanned (plugins controller need to be in specific package so for that package component scan will be defined in parent context) and ready to use. I am able achieve the installation part however when I am trying to access bundle/plugin controller end point through rest call I get no mapping found error.
Has anyone tried something like this? It will be great if I can get reference to some example.
Thanks!!!
If you remove the spring part, I've already done this with
a) Apache Wicket and Pax Wicket
b) Vaadin
For a) you might want to look at the Apache Karaf WebConsole.
For b) take a look at this rather "old" showcase of mine.
Both of those showcases use either standard OSGi services or Blueprint for the services (http-services) and the discovery of new "web-components" or views.

MVC4: List of all urls available on the site?

We have quite a large MVC4 application and we would like to have Selenium go through every page and make sure it loads - some sort of smoke test.
I can use reflection to go through the assembly, find all controllers and all actions, check if actions are not post, come up with parameters for actions that require parameters.
Then I'll feed this list to Selenium and check that everything I need on the pages is done appropriately.
But before I start playing with reflection, I'd like to check if this has already been done, so I don't reinvent the bicycle. I have googled for such thing, but could not find anything.
p.s. Writing the reflection code is not an issue. Selenium is covered as well. Just checking if this has already been done.
The AttributeRouting project has a route debugger in place, which does work even if you don't use attribute routing inside your project.
You can see the class that handles displaying the routes over on Github but I'm not sure it will display the routing information when the project isn't run locally. You may need to adapt that code so you can access it safely from your Selenium instance (and make it machine readable using JSON or something).

Nested ServiceStack Sites & Routes

I have a large number of services that my team are building and the auto-generated metadata is getting a bit unmanageable. To combat this, I created a project as a nested site (or sub-site) of the root. This works fine on my IIS local, but doesn't seem to work on a server-based IIS. Is it possible to get URLs like the following:
- http://server/WebServices [Root Project]
- http://server/WebServices/Project1 [Sub Project 1]
- http://server/WebServices/Project2 [Sub Project 2]
I know that using the routes in the AppHost I can get this effect but the resulting metadata is starting to get huge as they're all in one site. What I want is to be able to manage separate services in separate projects and have them come out in a hierarchy similar to above.
Look into the implementation of Routes.AddFromAssembly() extension method which goes through all the services are registers routes with the following conventions:
/{requestDto}
/{requestDto}/{Id}
On each of the HTTP Verbs that are implemented.
You should be able to implement your own conventions using a similar approach.

Resources