We have an external dependency that connects to objects within SuiteCRM (custom objects that extend from SugarBean and Basic) and when we load up the application within our browser, it cannot load the Basic class, presumably because its not called into memory.
Is there a way to load all the required SuiteCRM classes into an external project, if they share the same root directory (e.g, /project is part of the SuiteCRM install)?
if you are accessing this via an external application. I would recommend using the rest / soap API to interface with SuiteCRM.
If you are trying to reuse the classes then you could do the same thing as one of the entry points like index.php, soap.php etc.
They all include entryPoint.php
require_once 'include/entryPoint.php';
Related
To call JSP's in AEM 6.2 I've been creating site pages then changing the resourceType to a JSP component. Without creating OSGi bundles, is it possible to call a JSP directly without having to go through the Page / Component reference method?
In short No. That is against Sling principles. Quoting the documentation
Sling Scripts cannot be called directly
Within Sling, scripts cannot be called directly as this would break
the strict concept of a REST server; you would mix resources and
representations.
If you call the representation (the script) directly you hide the
resource inside your script, so the framework (Sling) no longer knows
about it. Thus you lose certain features.
For more information, please refer The Basics
In a custom plugin in custusX i use mServices->patientModelService->getPatientLandmarks()->setLandmark to programmatically alter some landmarks. I want to perform the registration with a already present volume.
In LandmarkPatientRegistrationWidget in org.custusx.registration.method.landmark, performRegistration() calls mServices.registrationService->doPatientRegistration().
However, I'm not sure whether my approach to get hold of a registrationService instance is right.
I have so far added org_custusx_registration to the CMakeLists.txt file and added "cxRegistrationService.h" and <cxRegServices.h> as includes.
Now I can define a RegServices mRegServices and initialize it in the constructor with the mContext of the plugin.
But do I create an own registration service or do I get access to the already existing? How can I get access to the already running registration service?
Your method correctly reuses the existing running registration service.
The default setup of CustusX register a single instance (object) implementing the cx::RegistrationService interface. The cx::RegServices helper class contains a cx::RegistrationServiceProxy, which acts as a smart pointer referring the object. Service objects are only created by the plugin that implement them: Users simply get access to these objects.
The RegistrationServiceProxy implements this using a ctkServiceTracker and related classes, see for example this tutorial on OSGi, section 5.4 (in java, but the principles apply).
Do you have it as a separate Module, or just one separate Controller, or multiple Controllers without any logical separation from Frontend (except for Auth ofcourse), or something else?
Assuming that backend is reasonably complicated, i.e. something more than review/confirm/delete comments for your BLOG.
Definatly belongs in a new module then it is easy to create a separate layout in my opinion.
In a recent project a colleague created a separate admin controller in each module with the layout defined in an admin module. This way he could drop in/remove modules from the project with the main admin module autodetecting which modules are installed and creating menus based on the admin controller found in each pluggable module.
I have explained that poorly, but it's a good system.
I would create a separate module. Otherwise you might run into context issues because the ArticleController in the frontend should have other/limited functionalities then the administrative ArticleController and you end up implementing mixed controller classes (bad idea!) or prefix the administrative class.
So having multiple modules makes it easier to separate different concerns.
(Plus it will make it easier for you to implement an ACL and handle the corresponding resource/role definitions.)
I originally wanted to find out how to access the Doctrine 2's Entity Manager from within Entity Classes. But I saw another question Using EntityManager inside Doctrine 2.0 entities, and learnt that I should be using a service class. I wonder where should I put in a Zend Framework Application? Also is it also called a DAO (Data Access Object)? I am thinking of naming it DAO instead of Service as Service sounds alot like something for external sites to use (like Web Service)?
I am thinking something like Application_Models_DAO_User?
Service classes are part of the autoloader mapping. Like Application_Model_Something can be found in application/models, it's the same for services.
An application service Application_Service_Something should be located at: application/services/Something.php
When you use service classes inside modules, for example Blog_Service_Something they need to be located at: application/modules/blog/services/Something.php
I think classes like entity managers shouldn't be part of your controllers nor your models, but located in service classes.
I have a custom HttpModule rewrite engine in an existing web application project that maps urls of the form
/tom/dick/harry/.../.../...
to a hierarchical navigation system stored in a database, ultimately resulting in a HttpContext.Current.RewritePath() call to the .aspx page that the requested path resolves to.
I'm interested in mixing MVC in with the existing app. If the MVC code works well and provides real benefit over the code behind model, how will I handle precedence between my rewrite engine and the routetable? Is the routetable referenced before the HttpModule, after? Are both called?
The routing in ASP.NET MVC is implemented as a custom HttpModule (UrlRoutingModule), so which takes precedence will depend on the order your modules are declared in web.config