Could anyone tell me what exactly 'SCORM' is?
And if it's possible to use with .net?
Can any one give me a sample code which is already implemented in asp.net with c#
Thank you
SCORM is a standard for e-learning coursess. It allows these courses to be defined in a standard way making it possible to transfer these course between different e-learning systems ( typically Learning management Systems) and for course content providers to sell/develop courses independently of the software used to deliver them to students.
SCORM is an XML based standard and as such any system capable of reading XML can implement code to process SCORM files.
You might want to look at the source code of moodle but SCORM is complicated
Sharable Content Object Reference Model (SCORM) is an eLearning specification drafted by the ADL for content sharing in eLearning. The original specification for the API was loosely based on an earlier Airline Industry CBT (Content Based Training) Committee (AICC) specification. The original drive for SCORM was a requirement signed by President Clinton which required a certain percent of learning to be computer based training.
The server-side portion of this can be written in pretty much any server-side technology, including C# (Net). I am unaware of any open-source implementations available in C#.
The API itself is a Synchronous JavaScript interface that is used for loading/saving various points of state. The specification itself is very broad, and I've seen the interface actually written using a number of technologies (Java, Flash, and Synchronous XmlHttpRequest(s)). These front end (client) interfaces can then communicate to any number of back-end technologies.
Some down sides to the synchronous nature of the API are that this can quite literally freeze UI Interaction during requests depending on the interaction. I would suggest having a caching API, that handles its' interactions asynchronously, while mirroring the full content/interaction client side. (Exception being final commit/save action).
There is a new specification under the code name Tin Can that is currently being worked on. The initial test implementation was done in NodeJS with a MongoDB backend, however people in the industry were critical of the new/unfamiliar technology so recent implementations are based with an SQL backend, and a more traditional "enterprise" codebase.
Apart from the definition that you can read from Wikipedia, if you want to have a look at how SCORM works please give a look to Moodle an e-learning open source platform where you can find some scorm sample content and see how it works
Related
I'm writing a presentation for my company internally to summarize what I've learned about programming and how it relates to .NET, C#, and all of the key concepts companies look for and I'm a little stuck in how to explain API.
I know how API works, I've written many and I know that it's used to transmit data. The definition I stumbled upon is:
"API is Application Programming Interface, a set of definitions, protocols and tools for building application software... Just as a graphical user interface can be used to transfer data back and forth between person and machine, API is used to transfer data back and forth between machine and machine."
Thinking back to examples of reddit.com and other websites, if you append .json to the end of some websites you're making a get to their website and the information is served up in the form of JSON.
Am I right in saying:
"MVC can be used as API, but WebAPI is a pre-defined framework built to make API a lot more efficient, effective and easy to write"?
Yes.
API is a very broad term, which can be used to refer to any programming interface. You could use any HTTP-based system to build an API, so you could also use the ASP.NET MVC framework for it. It probably would make more sense to use a framework specifically meant for building APIs, but strictly speaking your statement is correct.
Summary and Question
I'm looking to generate code in C# to prevent significant repetition and wrap the Google APIs in a way like they do themselves, as stated on their .Net Client library page. Edit: Their generator is written in Python, apparently. I will continue to investigate other .Net options.
Where should I focus my attention, CodeDOM, Roslyn or something else? Should I not be considering Code Generation at all - and if so, what alternative track should I take to properly handle this situation?
Details
I am working on writing a wrapper for the Google .Net APIs to make a Google API library for PowerShell (for any and all Google APIs). I already have it working on three of the APIs, but since my project handles all of the authentication (and storage thereof) and other things like pagination, I have to basically wrap each API method call to work with my own authentication so that the user doesn't have to worry about it. This leads to a lot of repetitious coding encapsulating methods that already exist in the .Net Libraries:
public Data.Asp Get(string userKey, int codeId)
{
//I have to wrap their get method with my own using GetService(), for example
return GetService().Asps.Get(userKey, codeId).Execute();
}
Since this is all patterned on information that exists either through the Google Discovery API or through the underlying client libraries, I feel like there should be some way to generate the code and save my hands some trouble.
Some Background and Related Info
On the main page for the Google API .Net Client libraries it is stated:
The source code for the individual Google APIs is programmatically generated using the Discovery API.
I would like to do something similar, though I have no idea where to focus my time and research. I've looked up CodeDOM (and the inherent limitations), Roslyn as well as some differences between the two. I've also checked out the T4 Text Templates for Visual Studio.
To be clear, I am not looking to generate code at runtime as I would with something like Reflection, I am looking to generate bits of a library - though I'm not sure if I am looking for active or passive generation yet.
I work at Google on the .NET client libraries (among other things). Your question is pretty far reaching, but here is the general idea:
The metadata for describing "most" Google APIs is through a discovery document. That describes the methods and types the API has.
Client libraries for accessing Google's APIs then are generated, like you point out, from a Python library. (Using Django as a templating language, specifically.)
Once the code is generated for each Google API, we invoke MSBuild, package the binaries, and deploy them to NuGet.
As for your specific question about how to generate code, I would recommend you build two separate components. The first is something that will read and parse the discovery document, the second is the component that will emit the code.
For the actual code gen, here are some personal opinions:
The simplest thing to do would be to use a text-based templating language. (e.g. Django or just write your own.)
CodeDOM is an interesting choice, but probably much more difficult to use than you want. It is how Visual Studio does some of its codegen, e.g. you describe the code and CodeDOM will emit C#, VB, MC++ to match your desires. However, since you are only focusing on C#, the benefit of CodeDOM supporting multiple languages isn't useful.
Roslyn certainly is a cool, new technology, but that probably won't be of much use. I believe Roslyn has the ability to dynamically model code and round-trip the AST to disk. But that is probably overkill, since you aren't trying to build a general-purpose C# codegen solution, and instead just target generating code that matches the API discovery document.
So I would suggest a basic text-based solution for now, and see how far that can get you. If you have any other questions feel free to message me or log an issue on the GitHub issue tracker.
I'd like to create a webapplication that allows users to work with graphs. (Retrieve data related to nodes, create new ones, drag them, etc.) I thought it would be a good idea to store the data in a graph database (e.g. neo4j) and display it with some JS-Frameworks (e.g. http://cytoscape.github.io/cytoscape.js/).
Currently I'm not sure which web application technology I should use. Since one requirement is to use microsoft technologies wherever possible I thought it might be a good idea to go with ASP.NET in C#. However, during the first chapter of my ASP.NET book the following is mentioned:
it’s worth noting that ASP.NET is not the best platform for writing
complex, app-like client-side programs
So, which technology should I use to create my web application? Any recommendations?
Well,
from my experience, I think one of the JVM based languages like Java is a save bet, if not the most sexy one. And it works best with Neo4j, and Java 8 is really nice syntax-wise.
For JS-based frameworks, try Node.js and the Neo4j REST API, should work good, too.
I'm about to embark on a new project within which we require the ability to re-use validations based on (preferably XML) on both the client and server.
We would setup a service to provide the XML validation configuration data to the client side.
The following is not meant to be inflammatory in any way.
The Enterprise library does have support for the validation of objects to be configured in XML but java developers would not have access to a java reader version of this XML interpretation.
There is also Spring.Net validation but again I think this may be tied too much to .net. Is the Spring.Net validation suite straight ported over from the java spring framework i.e. without changes to the xml config?
Is there any other frameworks for validation which are able to be used in both .Net and Java?
The project will be fully SOA and the validation is one of the last things I have to figure out.
EDIT:
To clarify the validation needs to occur within the language that the receiving client is using, i.e. if the client to the web service is Java then the validation would be read into java and validated within java so that error conditions could be reported to the UI for the user to rectify. Equally if it was a .net client the .net client would be able to read it in and provide the same functionality.
I don't want to validate within the xml, the xml will be a set of rules, i.e. Customer.Name will be a maximum 50 chars long and must be at least 5 chars, and is a required field.
Thanks
Pete
Have a look at DROOLS.
There are .Net and Java versions of the rules engine.
Java Link and .Net Link
I've not user the libraries, so cannot comment on how "seamlessly" the one set of rules could be used in both environments.
How about trying the validation in a scripting language that can be run in both the jvm and by .net.
Scripting languages would be ideal for this kind of logic so maybe:
Ruby - http://www.ironruby.net/ and http://www.jruby.org/
or Perl.
This approach would allow use to the exact same code for validation and then call this from Java or .net.
Using jruby wouldn't be much of a performance overhead and it can integrate very closely with java. I've less experience with Ironruby but from what I've read once the code has been loaded and is running the performance is ok and it can be integrated well into the .net code - see: http://www.ironruby.net/Documentation/.NET/Hosting
Not to take away from my answer but regardless of how you do this it will involve introducing a new technology with all the associated overheads - dev environment etc. A better approach may be just to do it in .net and java seperately but maintain a very extensive test suite of examples to ensure that two validations remain in sync.
Not sure what sort of validation your are trying to accomplish. If your business objects are going to be serialized in XML form, then aside from schema validation, you can augment that with additional business rules and checks using Schematron.
Schematron is an ISO standard and provides a way of encoding business rules, restrictions and validation that is not possible in XML Schema.
The Schematron differs in basic
concept from other schema languages in
that it not based on grammars but on
finding tree patterns in the parsed
document. This approach allows many
kinds of structures to be represented
which are inconvenient and difficult
in grammar-based schema languages. If
you know XPath or the XSLT expression
language, you can start to use The
Schematron immediately.
My company is currently in the process of creating a large multi-tier software package in C#. We have taken a SOA approach to the structure and I was wondering whether anyone has any advice as to how to make it extensible by users with programming knowledge.
This would involve a two-fold process: approval by the administrator of a production system to allow a specific plugin to be used, and also the actual plugin architecture itself.
We want to allow the users to write scripts to perform common tasks, modify the layout of the user interface (written in WPF) and add new functionality (ie. allowing charting of tabulated data). Does anyone have any suggestions of how to implement this, or know where one might obtain the knowledge to do this kind of thing?
I was thinking this would be the perfect corner-case for releasing the software open-source with a restrictive license on distribution, however, I'm not keen on allowing the competition access to our source code.
Thanks.
EDIT: Thought I'd just clarify to explain why I chose the answer I did. I was referring to production administrators external to my company (ie. the client), and giving them someway to automate/script things in an easier manner without requiring them to have a full knowledge of c# (they are mostly end-users with limited programming experience) - I was thinking more of a DSL. This may be an out of reach goal and the Managed Extensibility Framework seems to offer the best compromise so far.
Just use interfaces. Define an IPlugin that every plugin must implement, and use a well defined messaging layer to allow the plugin to make changes in the main program. You may want to look at a program like Mediaportal or Meedios which heavily depend on user plugins.
As mentioned by Steve, using interfaces is probably the way to go. You would need to design the set of interfaces that you would want your clients to use, design entry points for the plugins as well as a plugin communication model. Along with the suggestions by Steve, you might also want to take a look at the Eclipse project. They have a very well defined plugin architecture and even though its written in java, it may be worth taking a look at.
Another approach might be to design an API available to a scripting language. Both
IronPythonand Boo are dynamic scripting languages that work well with C#. With this approach, your clients could write scripts to interact with and extend your application. This approach is a bit more of a lightweight solution compared to a full plugin system.
I would take a look at the MEF initiative from Microsoft. It's a framework that lets you add extensibility to your applications. It's in beta now, but should be part of .Net 4.0.
Microsoft shares the source, so you can look how it's implemented and interface with it. So basically your extensibility framework will be open for everyone to look at but it won't force you to publish your application code or the plug-ins code.
Open source is not necessary in any way shape or form to make a product extensible.
I agree that open source is a scary idea in this situation. When you say approval by a production administrator - is that administrator within your company, or external?
Personally, I would look at allowing extensibility through inheritance (allowing third parties to subclass your code without giving them the source) and very carefully specified access modifiers.
Microsoft already did exactly this, resulting in Reporting Services, which has every attribute you mention: user defined layout, scriptability, charting, customisable UI. This includes a downloadable IDE. No access to source code is provided or required, yet it's absolutely littered with extensibility hooks. The absence of source code inhibits close-coupling and promotes SOA thinking.
We are currently in a similar situation. We identified different scenarios where people may want to create a live connection on a data level. In that case they can have access to a sinle webservice to request and import data.
At some point they may want to have a custom user interface (in our case Silverlight 2). For this scenario we can provide a base class and have them register the module in a central repository. It then integrates into our application in a uniform way, including security, form and behaviour and interaction with services.