Creating a plugin to extend Qt applications - qt

In the official documentation is just shown code with explanations not about a project apart. My question is: Do I need to create a stand alone project which will contain interface and plugin class? And which project template should I use? C++ library?

Knowing Qt's plugin architecture is probably not going to help you much when extending a 3rd party application. The application will undoubtedly have wrapped that mechanism for it's own usage patterns - assuming that the application is even extendible.
So to answer your question directly: The application you are developing for should have it's own API and documentation for extending it, reading that will give you the answers you need.

Related

Symfony 4. Code organization

My question is next - how you organize code-base of your application when it have a lot of complex code?
I start learn Symfony 4 framework. Before I developed applications using Yii 1.1 and Yii 2 frameworks. In projects that was built around this frameworks code divided by modules for better organization and maintenance. This way of code organization is encouraged on all forums dedicated for Yii frameworks.
In Symfony world closest analog of Yii modules is bundles. As I understand, after reading related articles and docs, they really was used for such code organization, but they were developed not exactly for this purpose. For Symfony 4 authors recommend build bundle-less applications and at this point I really confused.
Search for answers on my questing give me nothing. Some advice to group classes under namespaces (sub folders) in controllers, templates, entities, etc, but I feel that this is not a right way since views, controllers, services and other classes will be scattered across project.
I know that one right answer for this question does not exist, but anyway I curious about how this problem is solved in Symfony world.
Nothing is stopping you from just ignoring the current official recommendation and splitting your web app into multiple Flex Bundles. That's what I'd do because as it stands now, what they are recommending is essentially an antipattern.

How to handle routing in a DukeScript web application

DukeScript looks like a life saver for we Java guys! I am considering it for a serious project. Was curious to know whether it's production ready and well documented. Also, liked to know what would be the best way to support routing in a web application.
I asked this question at the official google forum, but didn't get a reply. So, thought to re-ask here.
Here's a blog post with a little example. It shows a simple integration of location hash based routing with knockout templates. The full example code is available on github.
You might also use one of the javascript libraries like sammy or pagerjs, which would require integration with these frameworks, but I wanted to keep it simple.

Providing SaaS functionality to a .NET portal with DLLs

I'm not sure I'm asking the right question here, but I'm looking to provide web based functionality from one ASP.NET application to another remote 'portal-like' application. Is it possible to simply give the portal a DLL? As an example, let's say the SaaS web app has a patient-entry form that I want to be able to use from the portal application. I would like the portal app to be able to set preferences (permissions, color, style, etc), make a function call, and have that capability presented within a certain div or something. Is there any .NET technologies that provide this kind of integration?
EDIT:
Here is a link to a quick diagram I made trying to describe the scenario: http://img.ly/ESG. I know there are other ways of doing this (eg JSON-P calls), but I need to give the portal developers something they can control on their end. Also, if anything changes they'll know I will send them a new version of the DLL which will indicate to them the new functionality.
I'll give you a shopping list of things to check out:
DotNetNuke:
http://www.dotnetnuke.com/
Workflow Foundation -
http://msdn.microsoft.com/en-us/netframework/aa663328.aspx
Microsoft SAAS platform -
http://www.microsoft.com/serviceproviders/saas/default.mspx
Depending on exactly what you're looking for, you might also research "multitenancy".
To answer your original question, yes, you can do it with DLL's, but there are easier ways to do it.

how to use plone as a framework

I am creating a web app that allows people to debate topics. I started prototyping with Django and have a functional app. I have not yet decided on what framework to use.
I've read about Plone the app and Plone the framework. I just can't seem to find any online documentation on using Plone as a framework. I'm looking for a tutorial or something that will show me how to build a web app starting with Plone. I just want to evaluate Plone before I choose my framework.
Anyone have any refs or recommendations on learning how to use Plone as a framework?
You should start here:
http://plone.org/documentation
A really good book is:
http://www.packtpub.com/Professional-Plone-web-applications-CMS/book
Plone is build on Zope Application Server (zope.org). You should read into the zope book too. Its free.
The IRC Channel (#plone) on freenode is full of experts that are willing to help. They like to discuss with :)
Don't use Plone as Framework.
Plone is an CMS. You can use it as framework,You can use Zope2 application server + Zope3 component architecture but I don't recomended to do this. Plone was designed to be a CMS so why You want use it as framework?
Why you shouldn't use Plone as framework?:
Plone is Slow!!!
30 sec. on every restart is too much. When You change something, you need restart. Autorestart(http://plone.org/products/collective.autorestart) doesn't help, you still need to restart Plone any time You change a zcml, portlet's code and sometime with python code.
Plone is too complex.
So big code base. Different coding styles (old Zope2, new component base Zope3, some parts are written with Grok).
You will need write xml (Generic Setup).
Nobody can say what you must use Archetypes, Formlib, z3c.form or Dexterity?
Plone doesn't have good documentation. Too much old documentation (plone.org/documentation) and there is no place where you can read what is the right way to do. The only good documentation is in Martin Aspeli's book (martinaspeli.net/plone-book) but you will need more and this book isn't open, so You will need buy it.
Plone has so many products but if you need really stable and quality stuff you will need write your own.
Plone is Slow!!! Forget test driven development.
I think that the most important factor in choosing a framework is the existence of good documentation. If you can't find good docs for using plone in the way that you want without having to ask here first, that's all the "evaluation" you need.
I'd stick with Django.

Add ons in a compiled language

We are developing a CMS in ASP.NET. We love the idea of add-ons (like in Wordpress, where any developer can add a menu button or a widget) and would like to enable developers to do the same with our system.
However I think that the fact that C# is a compiled language is an obstacle in the way of add-ons.
Am I right? Or is there a way to create add-ons for a ASP.NET application?
The fact that C# is a compiled language isn't a problem at all. In fact the .NET framework should make it relatively easy to load other code (just as Java does, for the same reason). Look into the Managed Extensibility Framework, which is all about loading Add-Ons in managed code.
It's not an obstacle at all. MEF has already been mentioned, you could also use:
System.Addin
Mono.Addins
I'm not sure for ASP.NET specifically, but in the only compiled programming language I know (Objective-C/Cocoa), there's the concept of Bundles that can be loaded dynamically. I'm not sure how that works on the backend, but I'd guess that there is some similar system for C#/ASP.NET.
I don't know how it's done in Wordpress, but there should be many ways. You can allow developers to upload their assemblies with compiled code or you can allow them to upload code in C# or IronPython or anything that supported and compile it dynamically. Maybe you can use WebParts for your task.
Microsoft has created the Managed Extensibility Framework (MEF), specifically for this problem: providing .NET plugins for .NET applications. It is the framework that (future versions of) Visual Studio use for writing managed plugins.
However, please consider using a dynamic scripting language for this! Problems like this are exactly what they are specifically designed for. If you host the Dynamic Language Runtime in your application, it not only means that your users can extend the application in a scripting language, but even in any dynamic language (scripting or otherwise) for which a DLR implementation exists: Ruby, Python, Smalltalk, Scheme, JavaScript, PHP, you name it. Biggest disadvantage: the DLR hasn't been released yet.
In C#, you can create any assemblies, link them as DLL files and then do whatever you want.
The usual case would be to define some kind of Plugin Interface which must be implemented by all the plugins.
Then you can load all plugins from the filesystem (by iterating over the plugin DLLs), find the class inside which implements the interface, instantiate it and work with it.
If you want to provide plugins with unloadability and security, you could create an application domain and load the plugins to that, increasing complexity, but also increasing stability (a bad plugin won't crash your app).
Please ask more specifically if you want a specific answer :-)
It's not too difficult to put hooks in place. You have to define in advance where the add-on features will appear. For example: when drawing a menu you can use reflection to search other dlls (with specific names and locations) for a "BuildMenu" function. You'll be defining the API for this function signature. It may have to return a list of items to be added to the base menu items collection.

Resources