Adding Components
advantage-logo
  • Advantage 8.x or Below
    • Older versions
  • Install Advantage

What are you looking for?

Getting started How To Guides LMS
  1. Home
  2. Advantage Full Stack Development Guide
  3. Visual Studio Introduction
  4. Adding Components
  • Overview
    • What is Advantage
    • Advanced Platform Features
    • Frequently Asked Questions
      • Glossary
    • Advantage and Accessibility: A Comprehensive Guide
  • Full Stack Development Guide
    • Developer Quick Start Guide Overview
    • Visual Studio Introduction
      • Install Visual Studio
      • Core Setup
      • Setting Up Your First Domain
      • Adding Components
    • Advantage Components
      • Pages, Templates & Layouts
      • Modules & Dialogs
      • Global Content (SiteSettings)
      • Custom Navigation Properties
      • Structured Content (Tool)
    • Developer Samples
      • Tool Walkthrough
      • Module Walkthrough (Dialog Content)
      • Module WalkThrough (Structured Data)
    • Bootstrap resource packages
    • Managing Templates
    • JavaScript Functions
    • Search Unit Configuration
    • Upgrades
    • Building PWAs and Native Mobile Applications
    • Web API
    • Client Side API
    • Advantage Installation Guide
  • CMS End User Guides
    • End User QuickStart Guide
    • Dashboard
    • How to Create Roles and Assign Permissions to Users in Advantage
    • Creating a User with Advantage
    • Managing Pages in Advantage
    • Editing Page Properties
    • How to Edit a Page
    • Task Manager
    • Asset Manager
    • How to Submit a Support Request for Advantage
    • Add or Update your License Key
    • Managing Global Site Settings; Header, Footer, and Company Logo
    • Managing Page Level SEO Settings
    • Modules, Tools and Key Feature Guides
      • Structured Tools
      • Feature Highlights
      • Module Guides
  • LMS End User Guides
    • LMS User QuickStartGuide
    • Create a Course in Advantage's LMS
    • Create a Quiz in Advantage LMS
    • Advantage LMS: Adding Question Controls
    • How to Add and Manage Scorm Packages in Advantage LMS
    • Member Management
    • Reports Management
  • eCommerce
    • Module How-To: Products
    • Product Manager
    • SnipCart
  • Advance Features Setup Guides
    • Advance Features QuickStart Guide
    • Bulk Import / Export
    • Layout Manager
    • Registering a Tool (Business Object)
    • Registering Modules
    • Managing .css & .js files
    • Add template and layout file paths
    • Adding Custom Docs and Links in your Advantage Admin
    • Steps to Create a New Domain in Advantage
    • Configuring Domains
    • Configure Single Sign-On
    • Setting Up Multiple Languages in Advantage
    • Configurations Settings
      • Configuring Site Favicon in Advantage
      • How to Configure Advantage for Grid System Entries
      • Configuring Advantage JavaScript Files
      • Managing Advantage Your Open Graph Integration
      • Steps to Save Changes to Robots.txt in Advantage
      • Configuring your Sitemap and XML: Optimizing Page Level Priority
      • Embedding Custom Scripts
      • Configuring Advantage Stylesheets
      • Analytics
      • Web API
      • Configuration Settings for Uploading Images
      • Configuring Editor Settings and Snippets
      • Configuring Error Logging
      • Configuring Error Pages
      • Configuring Content Security Policies
      • Configuring Image Sizes and Breakpoints
      • Configuring Advantage's Search and Indexing Features
      • Configuring SMTP Servers
      • Configuring URL Rewrites
      • Configuring Disqus
      • Configuring Social Links
      • Configuring Social Sharing
  • Knowledge Base

Adding Components

Module and Code File Locations


When a new domain is established within the BuildWithAdvantage framework, the system automatically generates a recommended directory structure, along with default controls and templates. This feature is designed to provide developers with an initial working model, enabling them to begin their projects with a standardized set of components and a common methodology. Such an approach is particularly beneficial when developers are juggling multiple projects, as it ensures consistency and efficiency across different development efforts. Below, we break down the key components of this initial setup:

 

Top Level (Site)


The top-level directory, often referred to as the "site" directory, serves as the root for the project's file structure. This is where the overarching organization of the site's resources begins, and it typically contains subdirectories for various types of files, such as compiled class files, user controls, pages, and more. By starting with a well-defined top-level structure, developers can easily navigate and manage their projects.

 

 

Compiled Class Files


Within the generated structure, a dedicated location for compiled class files is established. These files, typically with the .dll extension in the context of .NET projects, contain the compiled code of the project's custom classes and components. Storing these files in a specific directory helps in maintaining a clean project structure, facilitating the deployment and update processes, as well as ensuring that the compiled logic of the application is neatly organized and easily accessible.

 

User Controls and Pages


Another crucial part of the initial setup is the directories for user controls and pages. User controls (.ascx files) are reusable parts of the user interface that can be included in multiple web pages (.aspx files). By having designated folders for these components, the framework encourages modularity and reusability. This organization allows developers to efficiently manage and update the UI components and pages of the application, as each piece can be developed, tested, and maintained independently.

This setup process, triggered automatically upon the creation of a new domain in BuildWithAdvantage, lays the foundation for a well-organized and scalable project. It ensures that developers have a common starting point, regardless of the specific requirements of their project, promoting best practices and consistency across development teams. By adhering to this structured approach, developers can streamline their workflow, reduce development time, and increase the maintainability of their projects.

Adding an Advantage Control to Your Website Project


 

To include a new BuildWithAdvantage control to your website, you should:

  1. Access the Add New Item Dialog: In your IDE, open the 'Add New Item' dialog box. This is typically done within the Solution Explorer by selecting the appropriate folder where you want the new control to reside, right-clicking, and choosing 'Add New Item' from the context menu.
  2. Select from BuildWithAdvantage Components: Within the 'Add New Item - Sample' dialog, a list of available items is displayed on the left-hand side. This list shows various pre-defined BuildWithAdvantage components, such as:
    • Advantage ActionItem Control
    • Advantage BusinessObject
    • Advantage Module
    • Advantage Rewrite Module
    • Advantage SiteSettings BusinessObject
    • Advantage SiteSettings Tool
    • Advantage Tool

These components represent different functionalities and objects you can add to your project. For instance, the 'Advantage BusinessObject' could be a data model, whereas the 'Advantage Module' could be a self-contained functional block of the website.

  1. Choose the Specific Control: Decide which control you need for your current task. For example, if you want to create custom interactions within the admin section of your site, you might select 'Advantage ActionItem Control,' as suggested by the description in the right-hand pane.
  2. Configure Control Properties: At the bottom of the dialog box, you can specify the name of the new item. For instance, the screenshot shows the name 'ActionItem.ascx' for a user control. You also have the option to 'Place code in separate file' or 'Select master page,' which are important depending on whether you want to keep code-behind files separate and if the control should be associated with a master page.
  3. Add the Control: Once you have selected the desired control and configured its properties, click the 'Add' button to add it to your project. The new file will be created in the selected folder within the Solution Explorer, and you can then begin implementing and customizing the control as per your project requirements.

This process helps maintain an organized and efficient workflow, especially useful when managing complex websites or applications with many components. By using such a systematic approach, developers can ensure consistency across their projects and streamline their development processes.

 


    • Module and Code File Locations
    • Adding an Advantage Control to Your Website Project
    • Privacy Policy
    • Term of Use


    © Advantage 2024 - All Rights Reserved

    Back to Top Button
    ↑