How is your approach for creating your own set of controls aka own Extensions Library? - xpages

What is your approach for creating your own set of controls aka own Extensions Library? After a few years of Xpages development we have a huge set of controls that are general purpose for building UI, some web services etc. (Probably as most other developers.) When we start a new project now we have to copy the entire stuff from one database to new one which involves controls, jars, css, images, JAVA code ... and then you completely loose control to maintain some central version of this controls & codes, everything is scattered among several projects/databases and things get messy fast.
We have thought about creating our own extension library as described here
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Master_Table_of_Contents_for_XPages_Extensibility_APIs_Developer_Guide but there is not enough documentation for this topic and the entire development process is quite complicated (at least seems to me. I tried two times based on docs above going through eclipse plugin project -> feature project -> update site and still having some bugs around)
What is your experience and approach for creating and maintaining shared Xpages controls in your Domino environment? Is there some hidden feature we miss here that can help us?

Take a look at the XSP Starter Kit on OpenNTF and the XPages SDK to setup an eclipse environment for plugin development. You'll also want Eclipse IDE for RCP and RAP Developers. Install the starter kit and SDK into eclipse and you should be all set.
The starter kit is a sample plugin with all kinds of examples of phase listeners, components, etc. Once you want to deploy your plugin, create an update site from within eclipse and use the Update Site NSF available on your server install to place your update site. Once that's done, you can replicate that NSF to any other servers that may need the plugin.
For more information about the starter kit, take a look at this slide deck. There is also a github project for the starter kit. Documentation for the XPages SDK can be found here. And a video for setting up the SDK is available on youtube. Lastly, here's the documentation for setting up the update site NSF.

While we haven't gotten to that yet in XPages, our model for regular Notes design elements is to have a central template that contains the elements that are shared, with those specific design elements marked to inherit from that template. Sometimes, a database inherits design elements from two different central templates.
That way, those centrally controlled design elements remain the same in all databases.

I would recommend looking at some example's on github for how they have library/components setup. One of the more simpler examples that has just a single component built into a Library is Steve Pridemore's App Layout Extension...https://github.com/DominoDev, Another good one is Nathan Freeman's Starterkit: https://github.com/the-ntf/xspstarterkit. Hopefully these will help you get the file structure down on which files you need and how they work.

Related

Building an App in SharePoint Online

I have a client that wanted an easier way for his team members to build/update pages on their site, their site is heavily customized with a lot of JavaScript. The issues is that when a team member wanted to add a new section to the page they had consult a dev person to hard code in the desired features. So we decided to create customizable web parts of those features making the site more self-serviceable.
When I first started I found some documentation that said to use visual studios to build the web part using sandbox code, upload it to the site and then they would just need to activate it to deploy it on the site. Buuut unbeknownst to me code based sandbox solutions are no longer supported in Sharepoint and therefore the web parts we built could not be deployed. I was then told that I needed to build it as an Add-in, but as I started building the add-ins I found that the customizable field properties (i.e. ability to change background color, text style/color and banner color) that I want are not implementable as a add-ins.
So now I’m back at square one and I don’t know if it’s even possible to build a web part as a add-in or do I need to go a different route?
Any thoughts or links to sources you can provide would be HUGELY appreciated!
Thanks
Terek
In SharePoint 2016 things have changed a lot from the traditional model which was the classic way of building web parts. The way you worked before is called "classic", the new way is called "modern", and the way to get your dev environment is the following (brace yourself, it is a long answer):
1) In SP2016/Online you will need to configure your dev machine with the following environment, installing the following:
NodeJS Long Term Support version
Yeoman (which will be used to create web parts)
GULP (which will play the role of virtual web server)
Once the three components above are installed, you will install the Yeoman SharePoint Generator to create the SharePoint Web Parts, Yeoman simplifies the process of creating things by delivering templates ready to use and making all the configurations standard, you gonna love this guy!
To configure your machine see the following link:
https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment
2) In SP2016/SP Online, you will develop for SPFx (SharePoint Framework), Microsoft has made significant efforts to address the changes and help developers to embark on this new journey by publishing training and educational material at GitHub, YouTube, and on its official website (I will add link below), but for the purpose of helping you, please follow this tutorial, it helped me to learn how to develop Modern Web Parts for SP 2016/Online:
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part
3) From the tutorial above, you will get a fully functional Modern Web Part that can be deployed to SP2016/Online, you will see the new modern architecture allows you that old experience of "sandboxing" web parts in a faster way without, thus solving your problem of constant updating/refactoring components in a live production environment. This way now allows you to constantly update the code and see the results in real-time , you will be able to see results on your dev environment by calling: https://localhost:4321/temp/workbench.html and at same time on your SP environment. for example: http://portal.company.com/_layouts/workbench.aspx
Links:
YouTube "SharePoint Framework Tutorials" - it is the step by step tutorial video showing the whole process of creating a web part:
https://www.youtube.com/playlist?list=PLR9nK3mnD-OXvSWvS2zglCzz4iplhVrKq
GitHub repository with the full documentation, samples and extras for the SPFx and PnP (this is another story for another time):
https://github.com/SharePoint
I hope it helps you!

What is the best approach of building SAP Hybris application from scratch?

I'm trying to build my first app on Hybris, but I'm not sure what is the best approach to build such applications. Let's say I sell flowers in my store. Currently there are 2 ways how to do it:
Create accelerator template and then reconfigure application.
Building app from the beginning.
The first solution may look very attractive, but I don't think it is better solution because:
Hybris doesn't provide an accelerator for my specific solution (flowers), application reconfiguration may take a lot of time.
Some accelerators contain more that one store - other stores should be removed.
The mess in the database. I have to spend time and understand which tables should be removed.
The second approach seems the most logical, but in this case I have some doubts, because the speed of development will be significantly reduced. Moreover, I think that developing a simple store on Spring Boot will be much faster than learning the Hybris platform's extensions and how they work together.
In this case, how should I start develop my application?
Honestly, I don't have experience with building complete SAP Hybris application from the scratch yet, but I have some experience related to development of the SAP Hybris extensions, so I'll try to provide my potential approach because I don't see many answers here.
I'd do it as follows:
Get the whole commerce suite
Run one of the recipe with the installer script (choose one, which will be the best for you - one of the most popular/common recipes is b2c_acc)
Remove unwanted extensions from the localextensions.xml file if necessary
Add another extensions, if you need them
Depending on your use case, create your own extension basing on the one of templates with ant extgen task inside the hybris/bin/platform/ dir (e.g. yacceleratorstorefront, ybackoffice, yempty, etc.)
Add your custom extension (or extensions) to localextensions.xml file
Start your development within your custom extension created out of available template
I know, it's kind of "specific" platform. I hope this answer will help a bit.
Cheers

How do I create transferable dll's for a specific website functionality?

VS2013 update 5, MVC5 using Areas
I have a stand-alone function programmed for a website. The functionality is a specific user interface to collect survey responses in a particular way. It has several controllers, a model and a group of views. The functionality is completely contained in an Area of the project, except for the Shared _Layout file that provides the main menu for consistency.
'Is it possible for me to' / 'how do I' compile this Area into a single or set of .dll file(s) that I could then add conveniently to other websites? I'm assuming creating something for transfer/download is very standard functionality. For example, I used Elmah.MVC for this site. What I want to do is pretty much create a package that can be downloaded in a similar way to how we integrate Elmah.MVC into a site. (Be certain I'm not talking about creating error logging software, I'm only using Elmah.MVC as an example of software that is easily integrated into other website applications.)
I've never compiled any website functionality into a .dll(s) for use elsewhere and would appreciate either some specific guidance, or perhaps what would be easier is to provide a link with a good step by step tutorial or explanation for how to do this. Most of what I've found on the web describes bits and pieces of doing this, but it's not enough for me to feel confident with it.
It seems to me there are a lot of 'moving parts' to taking a particular piece of an MVC application and turning it into something that is easily added to other projects.
A particular issue I don't quite grasp is the difference in downloaded packages between getting code and getting just the .dll(s). For instance, when I download an MVC5 site, I get controllers, models and views, but when I download Elmah I get a .dll and no code files. Also, I do understand the concept of transforms, but I'm just struggling right now with even getting from my programmed application into a 'package' regardless of the transforms that make it easy to integrate into another website.
These are just some of my questions I have about how to perform this particular process in developing deliverable and/or shareable software.
What you are looking to do is create a portable MVC Area project. A Portable Area is a set of reusable multi page functionality can be dropped into an application to provide rich functionality without having to custom build functionality that is literally the same in every application. An MVC Portable Area is really just a dll that contains the views, controllers, scripts, etc… needed to use in a website that is either a Web Forms website or an MVC website. A developer can use them for a reusable widget or a complete engine. I have actually used them for both. Here is a link with some basic info to get started. http://elegantcode.com/2012/04/06/mvc-portable-areas/

How to Add MVC Views in Orchard CMS Custom Module

When I am creating a custom module containing my own Controllers and Views, the default project created by Code Generation creates a project that is like MVC but Visual Studio does not recognize it as an MVC project so it doesn't offer the normal "Add View" tooling as it does in a "real" MVC project.
I have seen posts talking about changing the Project type GUID in the project file but I am hoping there is an alternative to this approach. I have also seen tutorials where the presenter is using Resharper. I am currently not a Resharper user so I am not ready to adopt this approach either.
Are there project templates available? Any Code Generation module features I can take advantage of? I mainly want to find out how people are doing this now to make the development workflow go faster.
Thanks,
Brian
Yes, that's what the code generation tool does, so that we can reduce the Orchard requirements just to ASP.NET 4. Now a module is just a project and a manifest, living in a subfolder of Modules. There is nothing magical about the command-line and it's perfectly fine to create the project from VS. Or you can modify the code generation command so it adds the project type guid at creation. Both choices are valid, you just need to be aware that if there are other users than yourself, you might prevent them from opening the module in VS unless they install the MVC tooling first. That should not be a big problem, but just something to be aware of.

Simple CMS for building a small company presentation-website

I'm looking for a free, simple and efficient CMS for building website for a small company.
Prerequisites are:
The website is nothing more than a presentation - with informative content and gallery. The website should contain a nice-looking gallery with js/ajax flavour. Nothing more is planned for now, but it would be nice if CMS would feature some more generic modules/extensions in case I would like to use them in future.
Design templates should be easy to adopt and change.
Coding as little as possible.
I thought about Drupal, but is there any other CMS which would better fit to these requirements?
Please don't list available CMS-es here. Give it a reason!
Wordpress is nice too :p It has a big community behind...
I say Drupal.
Drupal is really good in content management. You can create different content types, and assign them fields (in Drupal 6, you will need the CCK contrib module). You can create a gallery with Views and it's output plugins. There are dozens of them, using different layout and JavaScript effects (mostly different jQuery plugins, but there are plugins for lightbox and thickbox also).
Drupal has a group of themes called "starter themes". These themes are half-ready, and it is very easy to create your own custom themes with them. All you need is to create a subtheme. (Basically making an info file and copy some other files. There are really a lot of howtos out there.) There are also starter themes for 960 (CSS framework), so you can make the site layout really fast. The most famous starter theme is called Zen. You might want to use that.
Except for the theme, I don't think that you have to write any code. Writing a theme for Drupal is not hard, since it uses PHP to render the themes.
Still in beta (0.5) phase but looking very promising: Orchard, a new ASP.NET MVC based CMS created by the people from Microsoft.
Orchard will create shared components for building ASP.NET applications and extensions, and specific applications that leverage these components to meet the needs of end-users, scripters, and developers. Additionally, we seek to create partnerships with existing application authors to help them achieve their goals. Orchard is delivered as part of the ASP.NET Open Source Gallery under the CodePlex Foundation. It is licensed under a New BSD license, which is approved by the OSI.
The intended output of the Orchard project is three-fold:
Individual .NET-based applications that appeal to end-users , scripters, and developers
A set of re-usable components that makes it easy to build such applications
A vibrant community to help define these applications and extensions
In the near term, the Orchard project is focused on delivering a .NET-based CMS application that will allow users to rapidly create content-driven Websites, and an extensibility framework that will allow developers and customizers to provide additional functionality through module extensions and themes.
It depends on what kind of CMS you are after
pity you don't like programming otherwise i would suggest django, an awsome CMS framework
if you are after something simple like a few static pages and a news feed or something like that then wordpress might suit your needs well, except i have found i don't like how it handles gallery's
if you need anything more, like more advanced custom content types for products, i would recommend Joomla or Drupal, and have plug-ins that has good support for photo galleys
Joomla! will probably be a better choice. It is very easy to use and is highly extensible.
Have a look at:
CMS Made Simple
CMS Made Simple provides a fast and
easy way to create a professional web
site and manage its content, whether
it's for a small business or a
multinational corporation!
Features
General Features
SEO Friendly URLs
Integrated and online help
Modular and extensible
Easy user and group management
Group-based permission system
Full template support, for unlimited looks without changing a line of content
Easy wizard based install and upgrade procedures
Minimal server requirements
Admin panel with multiple language support
Content hierarchy with unlimited depth and size
Integrated file manager w/ upload capabilities
Integrated audit log
Friendly support in forums and irc
Small footprint
Design Features
Accessibility WAI, WCGA, Section 508
XHTML and CSS compliant
Auto-generated menu
Every page can have different theme
Design protected from content editors
Multiple content areas on one page
If you have a little C# experience then you can try Umbraco.
It is a very powerfull CMS written in C# for ASP.NET
It is one of the most powerfull both free and commercial CMS out there.
i recommend to check out the Feature Matrix so you can see if it fulfills your needs.
As an example http://asp.net uses Umbraco
have you tried DotNetNuke ?

Resources