How can I make 2sxc app URLs show up in DNN's Sitemap.aspx? - razor

I have a 2sxc app (using C# Razor template) that shows a listing and details view. I have 10 items. Each item has a friendly URL. Looks something like this:
domain.com/landing-page/details/the-benefits-of-jargon
domain.com/landing-page/details/code-samples
domain.com/landing-page/details/highlights-and-use-cases
etc…
Is there a way that I can make these URLs appear in the DNN Sitemap.aspx ? (as it stands, the only page that appears is “landing-page” because that’s the only real DNN page)

There are actually two ways. Dnn has some way you can write code to extend the page-structure provider. IMHO this is super difficult to do, but probably the official architected way.
Our way is much simpler ;)
Create a WebAPI which creates a standalone sitemap for your needs. You could assemble some strings, but we recommend to use the C# Xml object just to be sure. You can find some brand-new example on the RSS feed of the latest Blog5 app.
Register this endpoint as another sitemap on Google (yes, you can do that :)
That's how we do it - and we've been very successful with it creating landing-page systems that generate hundreds, sometimes thousands of unique landing pages.

Related

Front end for an iOS web app using Django Rest API

I ve recently been asked to work in the front-end of a new app which will be written with Django for back end.(They said it will be for iOS).
Even though I have experience working with front-end I never wrote any code for iOS or Django REST API. What are the differences? Is it html/css ?
In another words lets assume that someone has a code in Django which asks user a question and stores the answer. The response will be in JSON(I think.) He wants me to write front end. Should I write it in html?
One more question: What will determine that our app will be working in iOS and will not work in android. They said the app will be for iOS at first but since it uses REST API what is the reason it cannot be available at the same time for android?
The usual process of using django rest framework is to have interactions with your backend exclusively using json.(most of the time, some people might use xml). So in general, all the information (requests and responses) will be JSON. Once you have that part setup, there are a number of technologies that will help you create user interfaces. You can use angularjs or JQuery to send JSON requests and responses to the endpoints and display the information obtained.(the whole interface is modified with javascript.)
Now, for your mobile apps. There are two approaches you either create what people call a native app using Java(for android apps) or Swift(for apple devices).
If you decide to use that approach you will have to mantain both apps in different languages. The other way of doing things would be to create an interface using something like angularjs and use a tool like ionic to convert that app into an android/apple app. Using that approach you will only have to mantain 1 application.
Here is a small diagram to represent the interaction.
(Django rest framework) <=JSON=> (front end app.)
I would suggest to start with django templates, it might just do the trick.

How to customize buildbot web pages

I am trying to make some extra web pages for a test buildbot, since I am planning to have one running my project.
Practically I would like to have a waterfall page that show the button to build a specific builder, close to the build name, instead than in the builder page only. I would also like to have some reference documents loaded from inside the builder work folder, and from other locations on the slave machine; using buttons to display or hide them.
I've looked at the manual and I do not see any info about how do you customize or create new html pages, that can leverage on the Buildbot features (like the templates already included with Buildbot do).
I have opened some pages, and see that there are some html files that actually has non-html code statements like
% macro
% for
And so on. I am not a web programmer so I am quite clueless about what should I look for. Tried to google the word macro for HTML and I just got a bunch of results related to Wiki customization; it does not look like it is Python language so I am quite lost.
Is there anyone that was successfully able to make custom pages for the buildbot, and could give me some pointers about what to learn?
Buildbot uses jinja2 for templating, the jinja2 homepage has some nice documentation. This is where the non-html statements come from. I found google's chromium buildbot to be a good starting point, when learning about buildbot customization.
http://buildbot.net/buildbot/docs/0.8.7/developer/webstatus.html
http://jinja.pocoo.org/docs
http://src.chromium.org/viewvc/chrome/trunk/tools/build/masters/master.chromium/templates/

How to integrate WebSockets on top of a classic ASP web application?

In one of my projects, I have a very active classic ASP site with a requirement to integrate live event-based feeds as part of the existing UI. There is a plan to upgrade the site architecture to either MVC or MVP in the future, but this new feature must be implemented in the meanwhile.
I have decided to go with a WebSocket approach for this, as this is ultimately what we will want to use in the future, and rebuilding this doesn't make sense. The question is, how to integrate this with the classic ASP "architecture"?
The site already implements the jQuery library, and was hoping to leverage jQuery's capabilities to create those streamed sections on a given page.
The current req's ask for this news feed to exist on every page. Thus, loading a new page will re-render the news feed, and should kick of from where it left on the last page. For this, I'm guessing a position indicator will need to be read (session variable I'm guessing).
Anyhow, those are the requirements. I was thinking of wrapping the the entire existing classic ASP site inside a MVC or MVP (C#/.Net) project to allow us to begin swapping out legacy features as they are developed, such as this one.
I would like to get some advice on some recommended approaches for this scenario.
Thanks.
I would do a SignalR app and integrate it in you old app.
It's easy to integrate ASP classic with ASP.net MVC. Just mix the projects and exclude *.asp from the routes
routes.IgnoreRoute("{resource}.asp/{*pathInfo}");
You will have some trouble in the root (/), but you can sort it with a redirect.
For a mixed authentication (if you need it) you will need to write your own authentication in MVC to use the same auth cookie that you use in Classic ASP. I've done this in the past with success.

Jump-starting web development

I wrote a prototype for my software in Python as a desktop client-server program, but I want to do the real version as a web service. (I have seen the light? much better deployment and reduced cost) Trouble is, I don't know web development.
I already did something webdev-ish: I have a page with a form on it, that when submitted Apache will run my Python script, which will do some server-side tasks and then send the result on a new page back to the user. Its a very simple tool (doesn't use any DB or framework), but I suppose that's the basic idea of web-based services... I think. To me that was a workaround, I did not realize it is webdev-ish.
So I have a basic idea of how it works, and about 8 years of programming behind me, but I need to learn:
How to design web sites (XHTML and CSS?)
Javascript and AJAX
More advanced features of databases (Postgresql)
I'm thinking Python/Django is a safe bet.
Any suggestions on where to start? I'm not the type who has the patience to read a book; I would rather jump in and build something simple first, then bigger and bigger stuff, but I can't seem to get my head around learning web design - I still format everything with tables.
Cheers and thanks
Check out Django. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
There will be a learning curve, but you might as well learn how to do it right the first time. Go through the documentation, and start building small Django applications. There are tutorials on the Django website.
And yes, you will have to learn HTML and CSS anyway.
Tables are not evil, by the way. You don't have to learn your first website with CSS, but you will need to learn correct CSS layout sooner rather than later. There are free CSS templates out there you can use, which makes the correct use of CSS much easier.
I only got slightly into Django, but I hear good things, so stick with it if you like the approach... inheritance & templating language
XHTML blocks just need to not overlap (markup container rule, good XML syntax with contained elements closing before new ones are begun). Honestly the simplest & most common approach to start web layout is PHP, so I suggest that as first alternative since it is so template-centric.
my favorite CMS is ZOPE, built and used with Python for scripting. Zope3 is more like Django, Zope2 I use more still (Python 2.4.x) has some internal syntaxes and methods to grapple with at first, but if you wish to try it I have a basic site editing framework.
the advantage is the object database hierarchy is just like site structure, inheritance of scripts, content objects (HTML chunks & contextual values), properties... so duplication is minimized, the whole site can be a simple template, reuse & extension maximized. navigation scripted, archive by month & listing contents scripted, footer once, sidebar inherited throughout site - override by cloning into subdirs and editing or specifying object/property for local instance closest to the URL path then seeking up to root.
users can have roles in sections, XML-RPC/HTTP/FTP all ZOPE methods including user-defined, so rich clients can workflow media effectively. batch process media uploads with default containers for each item and metadata (filename, type extension) so users get right to their details. ZOPE can host files or static, remote, whichever, so long as the app knows where to find them (one base property for the app or project root)
if you get into Django there is the ZODB standalone library part of ZOPE for persistent storage only, no ORB

Convert Sandcastle Help File Builder Output (Web site) to MediaWiki format

I need to
convert my Sandcastle Help File
Builder (SHFB) output that is a Web
site (HTML) to Media wiki format
Find a way to transfer/include the
converted pages directly into the
MediaWiki we have set up.
Any ideas? we have over 1000 pages of HTML files inthe Website (output of SHFB).
I thought of using a html2wiki converter ..I could think of looking around for a script to convert those 1000 pages into wiki format... that could take care of (1).
But I would still be left with the block in the last bit of the pipeline - how to feed converted pages directly into the Wiki?
Take a look at Help Server. It allows to publish .CHM / .HxS produced by any tool (including Sandcastle) on the web and provides URL-based integration API.
We use MediaWiki as well. A set of templates for it allows us to create links to class reference shared by Help Server. Some examples of such links can be found right on that page.
Note that DataObjects.Net Help web site is running on Help Server 2.X, but the newest one is 3.X (example web site is here).
I did some work with ingesting existing material from several sites into a comprehensive Wiki. It did not involve Sandcastle, but if you're dealing with HTML it shouldn't matter much. html2wiki extensions are out there, and from what I have read they can solve a lot of problems. I needed a little more control over each node in the DOM, so i used Simple HTML DOM Parser. It's in PHP and was easily dropped into Mediawiki's includes.
For creating the new pages, I ended up writing a small script that uses Mediawiki's Article class, specifically the doEdit function. this allows you to create new articles programatically, without user interaction. Of course, you'd want to be careful with this... The last thing you need is to create 1000 pages that are no good and have to be deleted. But perhaps this will help get you going.