Is there more like OSGi? - osgi

Eclipse is based on an implementation of the OSGi framework.
Are there more attempts like OSGi? I.e. are there more specifications that define a generic architecture of a software eco system? Are there more concepts that lay out the pattern for a complex extandable organism composed of modules that interact and communicate?

Not as far as I am aware of. Which is sad because the specifications provide a comprehensive model of software engineering that is way more useful that most software practitioners and theorists see.
Note that OSGi does not stop at the runtime. With its capability & requirements model it provides a solid base for large scale software engineering.
The only thing it is bad at are hacks and shortcuts.

Related

Micro-services - decision on technology/platform

Is it good architecture of an application if,
I am using multiple technologies leveraging strong points of each.
for example:
Encryption in python,
integration of services in java etc.
or should I stick to one technology like Java as I am comfortable with it?
Also the reason for this question is I am thinking of developing a new application in which speed is a major concern, I am targeting to attain.
Also Database that I am preferring for now is MongoDb.
Any suggestions on the Technologies apart from these technologies?
Also will this approach help in speeding up the application?
Writing the main application in one language only is a easier approach than dividing your application and attempting to write pieces in each language that is best suited for the task, unless you are fluent in a few languages and the ones chosen are particularly suited to specific groups of tasks that make up parts of the functionality.
Because MongoDB has a Java Driver there's nothing wrong with writing your main application in Java and relying on libraries written in other languages (MongoDB is written in C++, C and JavaScript).
As long as other works you need to rely on are well maintained there's no reason to switch from your preferred language to match what any of your libraries are using.
If you add artificial intelligence to your program in the future and part of the code is to run on a GPU you are forced to have a program that is a hybrid; learning a new language along with the details of the underlying algorithms is certainly more of a burden than learning the API.
Decide where to draw the line, what you will write in your preferred language and what will be written by others. It's certainly better to choose libraries and programs that you interface with written in languages you understand (assuming that they are open source). If what you interface with has no source available it becomes a 'black box' which simply must work, there are occasions when that is acceptable and occasional when there is no choice.

Open Source Static Code Analysis Models

I am working on a project where I'd like to develop some static source code analysis tools. The source code will be in multiple proprietary languages that interact with one another. So, I am looking for a project that defines an abstract Model/AST and can do some data flow analysis for languages where I can translate each proprietary language into the Model and be able to analyze the data flow/tree.
Does such a project exist?
Not open source, but designed and proven useful for building tools to handle multiple, complex langauges: our DMS Software Reengineering Toolkit.
DMS contains strong parsing machinery (capable of handling difficult languages such as C++) that builds ASTs automatically from just a grammar description, and libraries to support construction of symbol tables, and various kinds of control and data flow analysis.
OP will have to provide grammar and semantical descriptions of his proprietary languages, but I think he is expecting that. If he wants to model flows across the languages, he'll have to organize his flow analyses for the individual languages to be compatible. The fact that DMS uses uniform infrastructure/datastructures to support all these activities even for different langauges will make this easier.
He should not expect a project involving multiple languages to be easy or quick, regardless of the framework he finds. Our intention with DMS was to make this practical.
I think the Object Management Group's (OMG) Specification for the Knowledge Discovery Metamodel (KDM) is kind of in the space you're looking for. (See http://www.omg.org/spec/KDM/). It's part of the Architecture Driven Modernization (ADM) activity at the OMG. KDM has been republished by ISO as ISO/IEC 19506:2012(E).
From the introduction:
This International Standard defines a meta-model for representing existing software assets, their associations, and
operational environments, referred to as the Knowledge Discovery Meta-model (KDM).
You'll likely have to do most of the heavy lifting yourself, but at least the metamodel has been provided.
More as a sidemark: If you are not too much interested in syntactic details and have the free choice of your platform, you might as well analyze code for a VM, like .Net bytecode.
There are compilers for C# and F# and also C++(/CLI) and Visual Basic (of course most of them from a well-known, large software company :-) )
They all compile to bytecode programs, which can be inspected e.g. by tools like Mono.Cecil, which allow to construct control flow graphs etc.

Cooperation between multiple programming languages

I'm a fairly advanced hobby programmer. I consider myself capable at Objective-C, Java, some straight C, Python, and general MVC design.
I've written quite a few programs but they have all been relatively self-contained, using external libraries occasionally.
When reading about larger projects, and/or more complicated programs, I hear a lot of language thrown around about "Writing one part in X, and writing this part in Y."
Since I have a lack of experience with this, I was wondering if someone could point me in the right direction. What general designs/mechanisms are employed for applications or projects written in more than one language? What is involved in a "scriptable" design?
Thanks for any guidance on the topic!
-Chase
There is no single "right way". A multitude of approaches exist, including the .NET-way, where all the languages are hosted inside a common runtime environment with well-specified interoperability constraints, and a good old Unix-way, where all the components are supposed to communicate via pipes or sockets, using simple text-based protocols.
For the latter you can read a classic book: http://en.wikipedia.org/wiki/The_Unix_Programming_Environment
Depends on what you need to do. For example if you want to build a poker game online then, most probably you would use java for the application and flash/flex for the interface. Java has the power of the libraries and the flash/flex are quite generally available and offer a rich interface.
If you have a software that receives input from an online application and offers output on a specific output (label printer for example) then your online-ready software (Java/PHP/Python) would best communicate with a specially designed program on the target computer. A program for which I'd use C++ for it's technical power, rigurosity and speed compared to java.
The idea is to identify the languages that suit your purpose best. In my opinion it is ideal that you use one language to do all the stuff, that is why I like java as it seems to fit everything although it has a more or less bad renown for slowness.
I see things in a kind of this way:
1. Engineered, machine oriented stuff then it is C++ (and languages of it's kind)
2. Mobile multifunctional stuff (middle-ware mainly) Java
3. Online , browser based stuff PHP especially for B2C(people oriented) applications
4. Python,Ruby etc are from my point of view somewhere between java and PHP but I never really worked with them so I can not give an exact opinion
You can link them together depending on your needs.

GUI: Decoupled view and design patterns for RIA

I made some GUI desktop applications on my first years of development, but my experience and practice have changed, so now I'd like to retake this subject with better knowledge.
Most of my experience has been web since then.
I've been reading about GUI Architectures, and several related questions here on S.O.. I know I'm still not in the "architect" level of knowledge from Design patterns and such, as to start building a great GUI App from scratch
I'm trying to figure out how to design an app with a GUI, using good design practices for the architecture. I'm focusing on MVC architectures, with RIAs (Flex, Java FX, you choose), thinking of keeping the GUI as decoupled as possible from the domain. This has brought me some trouble...
I've been having a hard time relating an MVC architecture such as SpringMVC with a GUI, which could also implement its own MVC. Most of what I've read are high level concepts, but I can't seem to be able to translate this into code.
"Where do I create the view?", "How do you hook the controller with the model and the view?", etc. These are some of the questions I keep asking myself after some reading and studying.
I'm probably kind of lost, and quite entangled as to where to start, so any help is appreciated.
Are there any guides/tutorials/documentation you can recommend to start on this subject? I should probably start with the RIA/GUI basics, and then specialize on the technology I'll use.
You didn't specify which language you prefer, but here are some practical guides for Java:
Java SE Application Design With MVC:
http://www.oracle.com/technetwork/articles/javase/mvc-136693.html
Model-View-Controller (MVC) Structure
http://leepoint.net/notes-java/GUI/structure/40mvc.html
Also, for specifically SpringMVC, here are some practical guides:
http://maestric.com/doc/java/spring
http://www.zabada.com/tutorials/spring-mvc-basics.php

Is any diagramming software exists for MVC pattern with code generation?

MVC patter uses delegates to interconnect a lot of class objects with each over. For Qt they are signals and slots, for C# they are events, for Java they are closures. But all diagramming and UML designers i know only operates with inheritance and child-parent composition :(. Is it any software available that allows to draw classes visually, design delegates, connect delegates to endpoints and generate code based on such a 'model'?
The description above may not be accurate: i'm not very deep in terminology. If anyone want any clarification about this question, please comment, i wll clarify what is unclear.
I've had good experiences with Sparx System's Enterprise Architect. You can download a fully functional 30 day trial.
AndroMDA has support to generate a web user interface from a UML model that defines the flow of an application. See the Search Criteria Panel from the Getting Started Java documentation. If you use the AndroMDA BPM4Struts cartridge, the presentation layer will be MVC based. Not sure this is what you're looking for though.
PS: The history of MDA is not full of successful experiences - and this is an euphemism - and I wouldn't recommend this approach (even less for the presentation layer)
If you're looking for something free / open-source, there's always:
StarUML
The only way you can succesfully apply MDA is the other way around. Define the model in a fluent DSL, and generate the diagrams you need out of it.
I've used TogetherJ and Enterprise Architect, but I'm not impressed. Nice diagrams, lousy workflow. I very much prefer a Smalltalk environment (preferably with MOOSE) and a few diagram generators.

Resources