Sitecore from the point of view of the developer

I was just starting to learn Sitecore, and I was wondering if anyone could help me educate what / how this is happening from a developer's point of view.

I went through a bunch of documentation, as well as their SDNs - it seems to me that most of them just drag and drop here and there through their interface (ie through their "Sitecore Desktop") with very little actual programming.

It's true? or their actual programming in C # / ASP.Net behind the scenes for implementing business logic, etc.

I looked through their main tutorial (creating a basic site for Product), and, as I mentioned above, all this is mainly done through their interface without any real programming - unlike working with the ASP.Net MVC3 Music Store tutorial, where you can see some c # programming.

Thanks!

+7
source share
4 answers

A Sitecore developer should have the most intense and deep understanding of Sitecore in general. Developers need to understand the perspective of CMS users (i.e., POV Content Editor), they need to understand the content architecture in the content tree, and they need to know the code that they create. The developer must have the deepest knowledge in the Sitecore solution, because you need to know how the architecture should know how to code. And knowing architecture means that you know how content editors will interact with content.

Architecture

Sitecore is a database. Think of it this way. You can create the site architecture as you want. But as you begin to learn the principles of Sitecore architecture and best practices, you will notice a pattern. Everything in the content tree is an element. The model for each element (called a template in Sitecore terms) is determined by the architect (who is often the developer). In fact, even if there is an individual for the role of the architect, they probably have the knowledge of the developer, since architecture determines the way of development. In fact, architecture is one of the most important things.

the code

The code is divided into different types, but in its simplest form there are two main things: layouts and sublayers .

Think of the layout as a regular ASP.NET application uses MasterPage. In Sitecore, the layout is actually an ASPX WebForm, but it acts as the main page. Some examples of layouts that you could place on your site are one column layout, two column layouts, a print layout. They are respectively transferred to the header and footer with one main content area, the header and footer with the main column and sidebar, as well as a print-optimized layout with the logo and main content.

Sublayouts are all the small components that make up a page. Examples include: basic navigation, a promo box in the sidebar, a list of the 5 latest news, a CTA for promotions, a slide show in the sidebar, etc. These components can be modular and moved by content editors, or they can be fixed at the location of layouts, for example, an ad unit can always be displayed on the sidebar of a Two Column layout as a business rule defined in the code.

To answer your question, is there real coding, yes. You write code using ASP.NET controls for Sitecore and the Sitecore C # API to access the data that is populated in the templates for each element. So, if you have a page element that had a page title for the title tag, your code will use the Sitecore API to access the "Tag Tag" field from the template (remember that a template in Sitecore is a data model) in Sitecore.

Coding for Sitecore

I would say that there are two approaches to coding. I believe that you have identified one of them that uses internal tools in the Sitecore interface. Sitecore has a section called the Developer Center that allows you to create layouts and sub-items. Honestly, compare this to using Visual Studio in development mode all the time. I have never used the Developer Center to execute my encoding. Instead, I code Visual Studio, which is the most common method for people who can code Sitecore (at least I think so). Now, if you are interested in how encoding connects to Sitecore data ... well, the answer is in Sitecore. There is a section of the tree called Layouts. Here are the names of your layouts and sublayers. Each layout element and sub-tier has a path that maps to either ASPX WebForm or ASCX User Control, respectively. This is how the code in the file system that you write in Visual Studio actually uses Sitecore. These layout elements and subtasks are then used through the Presentation> Details tabs for each element in Sitecore.

for beginners

One of the hardest things with Sitecore is the learning curve. I have been using Sitecore for many years and love it. In fact, all that I really do. This, of course, is my favorite CMS, fully customizable and very convenient for developers. Sitecore recommends that new developers adopt developer training classes so that they can basically explain what I explained above in the curriculum. In this tutorial, you will learn architecture, and then how code connects to it. The training includes manual work on the architecture in the content tree and practical coding. Recommended training courses for new developers:

+31
source

Sitecore is an ASP.NET application. This means that you can write any code that you like. Our team creates all Sublayouts (ASCX files) and layouts (ASPX files) on their own in Visual Studio, and not the editors built into Sitecore.

Some of the Sitecore installations I've seen hardly use CMS to render. Instead, the values ​​are pulled through the code, as if Sitecore was just a database. This may work fine in some situations.

The most impressive instances of Sitecore use all available tools that the developer has access to. Using Sitecore tools, the way they were intended to be used, allows you to use some pretty impressive editing options for (often non-technical) content editors.

For example: using Sitecore Fieldrenderer instead of a simple placeholder or label will not only automatically display the content appropriately (be it images or rich text), but it will also allow the content editor to edit the content directly on web pages , and not just on the back panel, which all systems CMS

Workflow is another killer feature for the client that is the right size for Sitecore. It allows you to create a process for approving items in a tree. Thus, legal, marketing and graphic teams cause everyone to subscribe to a new page before they go live. Then, when all approvals are completed, the site is automatically published.

To summarize: Sitecore is a .NET application, you can encode whatever you want. This means that you should focus on the capabilities of the CMS and make sure that it is suitable for you in terms of a content editor and financial perspective.

+6
source

In most cases, Sitecore is simply dragged and dropped, as you described in terms of content authorship, but in order to actually turn this content into a web page, you need to implement layouts, sublevels, etc.

Layouts are shared ASP.NET (aspx) pages, sub-layers are only web controls (ascx), and if you prefer, you can also use XSLT to generate HTML, but it is only useful for the basics (Sitecore only supports XSLT 1 in this moment) These ASP.NET controls are no longer like standard web form controls with code, etc. The difference is that Sitecore is your data source, and it gives you APIs for access to all relevant applications.

But the Sitecore API also goes beyond this and allows you programmatic access to virtually any component of the environment. The APIs are well documented and reasonably clear, and can be used for more complex scenarios.

The latest version of Sitecore (6.4) also allows you to use the MVC framework to create layouts / sublanguages ​​if you don't like web forms.

+4
source

Layouts and sub-paragraphs are a great way to make any adjustments in terms of coding, but there is a third way that is not mentioned here. We call it the sitecore extension. I often find that to meet customer requirements, creating a custom assembly for workflow actions or template commands is the only way. For example, a standard email notification when entering a workflow state allows you to use the server, recipient, description, etc. To the field of the action element. In our case, these values ​​are constantly changing, so we need to be more dynamic. The user assembly applied to the action allows us to flexibly perform a series of actions that the standard action will not. Another example was that we needed to have an elementary list in the list, and select the current element. The way to this was to redefine the action of the main talist with our assembly. Keep in mind that adding a lot of code to the layout (which may be the main page for a ton of pages) increases execution speed.

+1
source

All Articles