Fluent API

Posted by Community Admin on 03-Aug-2018 10:26

Fluent API

All Replies

Posted by Community Admin on 22-Feb-2011 00:00

Good day to you

Moving from 3.7 (WebSites in VB) to 4.0 (WebApp in C#) will be a challenge for me, but what the heck.

I usually learn by doing simple stuff and then move on and use cut and past a lot. So here a two questions.

QUESTION 1 -  I created my first toolbox item simple textbox button label function. Here I already seem to lack some basic understanding

1) I need to upload the ascx to the server
2) I need to build the project and upload the sitefinitywebapp.dll to the server to get it running
3)  when i make changes to the ascx it seems i only need to upload the dll and can leave the ascx on the server untouched. Does that make sense.
4) If yes why is it that i can leave the old ascx on the server (it will work with new stuff) but when I remove it it will fail.

Sorry for such a basic question. Do appreciate your good will on answering this

>>> My own answer. It seems the changes in the ascx must be published but the ascx.cs does not need to be published again its in the sitefinitywebapp.dll -> Is this correct?

QUESTION 2 - Looking for some very basic examples using the fluent api. Just like having the page title displaced in a label within a widget would be a good starting point for me.

Displaying simple stuff from the page the widget is on: last modified, last modified by could be examples.

Regards Markus

Posted by Community Admin on 27-Feb-2011 00:00

Hello Markus Berchtold,

Your assumptions in question 1 are correct. Since you will be using a web application you will have to build the project and code files before publishing them to the live environment. If this approach appears too clumsy for you, you can take an alternative approach. Following the instructions from this KB artilce you can create your own VB Sitefinity website. In short what you have to do is to open Visual Studio and create a new website, not web application project. Then take all files (excluding SitefinityWebApp.csproj file) from the _EmptyProject directory which gets created from the Sitefinity 4.0 Project manager. Amd add them to your newly created website. Then you will be able to work in the same way you are used to with Sitefinity 3.x.

The drawback of this approach is that you will not be able to manage the created websites from the Sitefinity 4.0 Project manager and you will have to manually upgrade them.

Our developer's guide contains examples on working with the Fluent API in all areas of Sitefinity. You can browse to the Pages section for example and see Native and Fluent API samples side by side.

All the best,
Radoslav Georgiev
the Telerik team

Posted by Community Admin on 28-Feb-2011 00:00

Sorry Radolslav

I was just looking at the Fluent API section.

Markus

This thread is closed