Skip to content

SoliEstre/EstreUI.js-sample-app1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

EstreUI.js

EstreUI is a "Rimwork" (Runnable Frame) designed to bridge the gap between classic web development and modern native-like web applications. It provides a structured, mobile-first environment for developers familiar with jQuery, ASP, PHP, or JSP, as well as native app developers looking to transition to the web.

ํ•œ๊ตญ์–ด ๋ฌธ์„œ (Korean Documentation)


Introduction

Concept: Rimwork

EstreUI is not just a library, nor a full-blown framework in the traditional sense. It is a Rimworkโ€”a "Runnable Frame" that provides the essential rim (structure) and lifecycle management for your application, allowing you to fill in the content with your preferred tools (like jQuery).

Target Audience

  • Classic Web Developers: If you are comfortable with jQuery, ASP, PHP, or JSP but want to build modern, single-page applications (SPA) with mobile-app-like experiences, EstreUI is for you.
  • Native App Developers: If you are moving from Android or iOS development to the web, you will find EstreUI's lifecycle events (onCreate, onShow, onPause equivalent) and intent system very familiar.

Key Features

  • MVC Pattern: Structured separation of concerns.
  • Lifecycle Management: Native-like page lifecycle (onBring, onShow, onHide, etc.).
  • Native-like UI: Smooth transitions, semi-stack-based navigation, and mobile-optimized touch interactions.
  • jQuery 4.0 Support: Fully compatible with the latest jQuery. Can also be used with lighter alternatives like Cash (experimental).
  • Hybrid App Ready: Designed to work seamlessly with WVCA4EUI (Flutter-based wrapper) for deploying to Google Play and App Store.
  • PWA Support: Ready for Progressive Web App deployment, including Windows Store support (requires SSL).

System Requirements

  • Browsers: Chromium 92+, Safari 15+ (iOS 15+).
  • Recommendation: iOS 16+ is strongly recommended due to severe CSS limitations in iOS 15.

Getting Started

Installation & Update

EstreUI is typically installed by cloning the repository or forking it. To update, you can pull from the upstream repository.

You can also start with an example web app that includes a basic implementation:

Example Web App 1 (preview) / (Github)

Estre UI Demo Application

APT. (preview) / (Github)

File Structure

  • serviceLoader.html: Service Worker Loader (handles updates before app launch).
  • scripts/: Core libraries and logic.
    • estreUi.js: Main framework code.
    • estreU0EE0Z.js: Estre Common library.
    • main.js: Application entry point and configuration.
  • styles/: CSS files for the framework and your app.
  • index.html: The main entry point (The "Rim").
  • fixedTop.html, fixedBottom.html, mainMenu.html, staticDoc.html, instantDoc.html, managedOverlay.html: Exported sections for layout.

Core Libraries

  • JCODD: A JSON-alternative format and utility library for robust data handling.
  • Doctre.js: DOM manipulation and document management helper.
  • Modernism.js: Polyfills and support for modern JavaScript features.
  • Alienise.js: Bridge for communication between heterogeneous systems (e.g., Web <-> Native).
  • estreU0EE0Z.js: Common utilities and base classes for EstreUI.

Initial Customization Guide

When starting a new project, you should customize the following:

  1. Metadata: Update <title>, <meta name="description">, and Open Graph (OG) tags in index.html.
  2. Icons & Manifest: Replace favicon.ico, app icons in images/ and /vectors/, and update webmanifest.json.
  3. Layout: Modify fixedTop.html for your header and mainMenu.html for navigation.
  4. Theme: Update styles/main.css to match your brand colors.
  5. Main Script: Update scripts/main.js.
  6. PWA: Configure the service worker loader in serviceLoader.html (update messages and colors). Update serviceWorker.js to include your app's files and version.

Core Concepts

Page System

Section Blocks (Layers)

EstreUI divides content layer areas as follows. Items below cover items above:

  • MainSections(StaticDoc): UI area paired with top/bottom fixed UI. PID starts with &m.
  • FooterSections(FixedBottom): Bottom fixed rootbar UI area. PID starts with &f. (Currently unused)
  • MenuSections(MainMenu): Left/Right sliding drawer menu area. PID starts with &u.
  • HeaderSections(FixedTop): Top fixed appbar UI area. PID starts with &h.
  • BlindedSections(InstantDoc): UI page area covering fixed UI. PID starts with &b.
  • OverlaySections(ManagedOverlay): Topmost overlay area. PID starts with &o.

Page Composition

EstreUI organizes content hierarchically:

  • Component(section): Top-level page. A functional grouping of pages in the application configuration. In staticDoc, it matches the tabs in fixedBottom. The default component for staticDoc has the id home. PID starts with the = prefix.
  • Container: Container page. Represents a major feature area of the screen. The default container has the id root. PID starts with the # prefix.
  • Article: Actual page content. Represents content at the screen or element level. The default article has the id main. PID starts with the @ prefix.
    • Multi-Article Support: You can display multiple articles simultaneously (e.g., split-screen for tablets), though this has some layout limitations.

Page Types

EstreUI classifies pages as follows:

  • Static: Static page. Elements are not deleted and remain after registration during Estre UI initialization. Cannot be closed with closePage(). PID starts with $s. (Can be omitted when calling)
  • Instant: Instant page. Elements are deleted after registration during Estre UI initialization and loaded when bringPage() is called separately. Can be closed with closePage(). PID starts with $i. (Can be omitted when calling)
    • Multi instance: Can display the same page implementation with different content simultaneously. PID includes an instance origin id prefixed with ^ at the end. (** Currently unimplemented.)

PID (Page ID)

Navigation is handled via PIDs, similar to deep links or routes.

  • Format: $s&m=component#container#article or defined aliases.
  • Example: customPageManager.bringPage("dashboard") or pageManager.bringPage("*dashboard") or pageManager.bringPage("&b=main#dashboard").
  • You can check the list of registered PIDs via pageManager.pages.

Lifecycle

EstreUI pages have a distinct lifecycle, similar to Android Activities:

  1. onBring: Page is being prepared. Since the Active Struct hasn't been called yet, this is a good place for element creation tasks involving handles.
  2. onOpen: Page is opening (transition start). Called only once.
  3. onShow: Page is fully visible.
  4. onHide: Page is hidden (covered by another page or closed).
  5. onClose: Page is closed. Called only once.
  6. onRelease: Page resources are released.
  • onBack: Called when back navigation is triggered. Return true to cancel the default action.

  • onReload: Called when page reload is triggered. Return true to cancel the default action (which is closing and reopening the page).

  • onIntentUpdated: Called when the page receives new data (Intent) while already active.

  • onApplied: Executed after apply() is called for data binding.

Page Handle & Page Handler

  • Handle: The DOM element or UI controller. In handler, use handle for lifecycle methods, otherwise this.handle.
  • Handler: The logic class (EstrePageHandler) managing the page. Accessed via handle.handler.
  • Use handle.component, handle.container to access parent handles.
  • Use component.containers, container.articles to access child handles.
  • For other access, use estreUi.mainSections, blindedSections to access handles in other sections. Refer to the source code for details.
  • You can access the page handle from any element object via element.pageHandle.
  • Tip: In browser developer tools, select a component/container/article element and type $0.pageHandle in the console to access it.

Data Binding & Intent

  • Intent: A data object passed between pages. Accessed via handle.intent or handler.intent.
  • Intent Data: Accessed via handle.intent.data or handler.intentData.
  • Intent Action: You can define actions to be performed at specific lifecycle points. Refer to the source code for details.
    • Timing: For onBring, onOpen, onShow, actions are performed after the callback. For onHide, onClose, onRelease, they are performed before the callback.
  • Active Struct: A comprehensive system for binding intent data and initializing dynamic elements. It handles data-bind-* attributes, local-style, solid-point, handles, and passive-links. It is executed during initialization (specifically around onBring) and automatically whenever intentData is modified. It can also be executed manually if needed.
  • Apply: When applying multiple changes at once, use handle.apply(data) to prevent applyActiveStruce() from running for each change. It executes once after all changes are complete, preventing overhead.

Handle (Extending EstreHandle Class)

  • Handles are for reusable components within an Article page.
  • Handles matching the UIS (UI specifier) in the HTML structure are initialized after onBring.

Built-in Handles

  • Includes EstreUnifiedCalendarHandle, EstreDedicatedCalanderHandle, etc. Refer to the default registered classes in the EstreHandle class in estreUi.js.

Custom Handles

  • You can register and use your own handles before Estre UI initialization. Refer to the implementation of the EstreHandle class in estreUi.js.

Handler (Direct Class Implementation)

  • Reusable implementations that perform specific actions as needed are called handlers.
  • Mainly initialized and used during page start callbacks.

Built-in Handlers

  • Includes EstreSwipeHandler, EstreDraggableHandler, etc. Refer to the default registered classes under the // handlers comment in estreUi.js.

Custom Handlers

  • There is no specific format for handler implementation, so feel free to implement them as needed.

Exported Sections

Parts of the layout like the header (fixedTop) or static content (staticDoc) are loaded from separate HTML files to keep index.html clean.

Content written directly in index.html will be placed after the content of each file.

If needed (e.g., for local execution), you can remove data-exported="1" or the attribute entirely to write directly in index.html without AJAX loading.


UI/UX & Utilities

UI Modes

  • Scroll Modes:
    • vfv_scroll: Scroll with inset added for fixedTop and fixedBottom.
    • sv_scroll: Standard scroll without inset.
    • txv_scroll, bxv_scroll: Scroll with only top or bottom inset added.
  • Article Modes:
    • fwvs: Full Width Vertical Scroll.
    • limit_on_screen: Limits page width to mobile levels.
      • fixed_height, full_height, max_height: Height limit modes. Refer to estreUiCore2.css.

Layout Utilities

  • Flex Presets: line_block (row), inline_block, lines_block (column).
  • Inset Utilities: inset_on_margin, inset_on_padding, inset_on_gap for consistent spacing.

Dialog Replacements

Native browser alerts are blocking and ugly. EstreUI provides non-blocking alternatives:

  • estreAlert(message): Replaces default alert.
  • estreConfirm(message, callback): Replaces default confirm.
  • estrePrompt(message, callback): Replaces default prompt.
  • Legacy calls: You can still use classicAlert if absolutely necessary.
  • estreToast*: Bottom-sheet style dialogs. Provides the same interface as alert/confirm/prompt and supports custom dialogs. Refer to source code.
  • note(message): Android Toast-like message output.
  • wait(), go(), stedy(): Show/hide global loading indicators.

Storage System

  • Async Storage: Prototype implementation for asynchronous storage matching Local/Session Storage.
  • Native Storage: Uses native app storage when running in WVCA4EUI.
  • Account/Device Storage: Backend-synced data (account/device specific). Requires custom API implementation to link with async storage.
  • Codded Storage: Storage implementation that automatically handles JCODD serialization/deserialization.

Global Alias Objects

  • uis: Collection of UI specifier aliases.
  • eds: Collection of Element dataset name aliases.

Local Style

EstreUI supports scoped styling within Article page elements using the <local-style> tag. This feature is processed as part of the Active Struct system.

  • Usage: Place a <local-style> tag inside a page element.
  • Path Replacement: Use ## within the style content to represent the path to the current element. This allows you to write styles that are scoped to that specific element hierarchy.
  • Mechanism: The framework automatically converts <local-style> into a standard <style> tag, replacing ## with the actual CSS selector path to the element.

Development Cautions

iOS Memory Limits

  • Issue: iOS 15+ (especially 15) has strict memory limits for web apps. Large CSS files can cause the app to crash or fail to load.
  • Solution:
    • Separate critical CSS for the splash screen.
    • Load the rest of the CSS (including heavy fonts) using Lazy Loading (<meta link="lazy" ...>).
    • Use defer for script loading.
    • Implement HTML in exported section files (like staticDoc.html).

Usage Examples

Mango Class (App developed with Estre UI as live code)

Demonstrates a full-featured education app with complex data binding, multiple page containers, and dynamic content.

  • Key Pattern: Extensive use of AppPagesProvider to map PIDs to specific handlers.
  • Application link: Mango Class

GMDG (Utility App)

A Braille viewer utility.

  • Key Pattern: File processing and simple UI structure. Shows how to handle file inputs and process data locally.
  • Application link: GMDG
  • Github repository: https://github.com/Esterkxz/GMDG

Common Patterns

  • index.html: The skeleton.
  • AppPagesProvider: The router configuration.
  • EstrePageHandler: The controller for each page.

Migration Guide

Classic Web (ASP/PHP/JSP) -> EstreUI

  • SSR Hybrid: You can still use Server-Side Rendering for the initial load (staticDoc), but since it loads only once at first run, you must handle page content and navigation via AJAX/Fetch to maintain the SPA experience.
  • AJAX: Replace form submissions and page reloads with fetch calls and EstreUI's page transitions.

Native App -> EstreUI

  • WVCA4EUI: Use this Flutter-based wrapper to package your EstreUI app for app stores.
    • Features: Provides a bridge for native features, handles PWA caching, and manages the webview lifecycle.
    • Bridge Handler: Allows JavaScript to call Flutter code and vice-versa.

Estre UI Rimwork (Korean)

EstreUI๋Š” ํด๋ž˜์‹ ์›น ๊ฐœ๋ฐœ๊ณผ ํ˜„๋Œ€์ ์ธ ๋„ค์ดํ‹ฐ๋ธŒ ์Šคํƒ€์ผ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐ„์˜ ๊ฒฉ์ฐจ๋ฅผ ํ•ด์†Œํ•˜๊ธฐ ์œ„ํ•ด ์„ค๊ณ„๋œ "Rimwork" (Runnable Frame)์ž…๋‹ˆ๋‹ค. jQuery, ASP, PHP, JSP์— ์ต์ˆ™ํ•œ ๊ฐœ๋ฐœ์ž๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์›น์œผ๋กœ ์ „ํ™˜ํ•˜๋ ค๋Š” ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ๊ตฌ์กฐํ™”๋œ ๋ชจ๋ฐ”์ผ ์šฐ์„  ํ™˜๊ฒฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.


์†Œ๊ฐœ (Introduction)

๊ฐœ๋…: Rimwork

EstreUI๋Š” ๋‹จ์ˆœํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋„, ์ „ํ†ต์ ์ธ ์˜๋ฏธ์˜ ์™„์ „ํ•œ ํ”„๋ ˆ์ž„์›Œํฌ๋„ ์•„๋‹™๋‹ˆ๋‹ค. ์ด๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ•„์ˆ˜์ ์ธ Rim(๊ตฌ์กฐ)๊ณผ ๋ผ์ดํ”„์‚ฌ์ดํด ๊ด€๋ฆฌ๋ฅผ ์ œ๊ณตํ•˜๋Š” Rimwork(์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ํ”„๋ ˆ์ž„)๋กœ, ๊ทธ ์•ˆ์˜ ๋‚ด์šฉ์€ ์—ฌ๋Ÿฌ๋ถ„์ด ์„ ํ˜ธํ•˜๋Š” ๋„๊ตฌ(์˜ˆ: jQuery)๋กœ ์ฑ„์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํƒ€๊ฒŸ ๋…์ž

  • ํด๋ž˜์‹ ์›น ๊ฐœ๋ฐœ์ž: jQuery, ASP, PHP, JSP์— ์ต์ˆ™ํ•˜์ง€๋งŒ ๋ชจ๋ฐ”์ผ ์•ฑ๊ณผ ๊ฐ™์€ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•˜๋Š” ํ˜„๋Œ€์ ์ธ SPA(Single Page Application)๋ฅผ ๊ตฌ์ถ•ํ•˜๊ณ  ์‹ถ์€ ๋ถ„.
  • ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ ๊ฐœ๋ฐœ์ž: Android๋‚˜ iOS ๊ฐœ๋ฐœ์—์„œ ์›น์œผ๋กœ ์ „ํ™˜ํ•˜๋ ค๋Š” ๋ถ„๋“ค์—๊ฒŒ EstreUI์˜ ๋ผ์ดํ”„์‚ฌ์ดํด ์ด๋ฒคํŠธ(onCreate, onShow, onPause ๋“ฑ๊ณผ ์œ ์‚ฌ)์™€ ์ธํ…ํŠธ ์‹œ์Šคํ…œ์€ ๋งค์šฐ ์นœ์ˆ™ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ํŠน์ง•

  • MVC ํŒจํ„ด: ๊ด€์‹ฌ์‚ฌ์˜ ๊ตฌ์กฐ์  ๋ถ„๋ฆฌ.
  • ๋ผ์ดํ”„์‚ฌ์ดํด ๊ด€๋ฆฌ: ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ๊ณผ ์œ ์‚ฌํ•œ ํŽ˜์ด์ง€ ๋ผ์ดํ”„์‚ฌ์ดํด (onBring, onShow, onHide ๋“ฑ).
  • ๋„ค์ดํ‹ฐ๋ธŒ ์Šคํƒ€์ผ UI: ๋ถ€๋“œ๋Ÿฌ์šด ์ „ํ™˜, ์„ธ๋ฏธ ์Šคํƒ(Semi-Stack) ๊ธฐ๋ฐ˜ ๋„ค๋น„๊ฒŒ์ด์…˜, ๋ชจ๋ฐ”์ผ์— ์ตœ์ ํ™”๋œ ํ„ฐ์น˜ ์ธํ„ฐ๋ž™์…˜.
  • jQuery 4.0 ์ง€์›: ์ตœ์‹  jQuery์™€ ์™„๋ฒฝ ํ˜ธํ™˜๋ฉ๋‹ˆ๋‹ค. ๋” ๊ฐ€๋ฒผ์šด ๋Œ€์•ˆ์ธ Cash์™€๋„ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(์‹คํ—˜์ ).
  • ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ์•ฑ ์ง€์›: Flutter ๊ธฐ๋ฐ˜์˜ WVCA4EUI ๋ž˜ํผ์™€ ์—ฐ๋™ํ•˜์—ฌ Google Play ๋ฐ App Store์— ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • PWA ์ง€์›: Windows Store ๋“ฑ๋ก์„ ํฌํ•จํ•œ ํ”„๋กœ๊ทธ๋ ˆ์‹œ๋ธŒ ์›น ์•ฑ ๋ฐฐํฌ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค(SSL ํ•„์ˆ˜).

์‹œ์Šคํ…œ ์š”๊ตฌ์‚ฌํ•ญ

  • ๋ธŒ๋ผ์šฐ์ €: Chromium 92+, Safari 15+ (iOS 15+).
  • ๊ถŒ์žฅ ์‚ฌํ•ญ: iOS 15์˜ CSS ์ œํ•œ์œผ๋กœ ์ธํ•ด iOS 16 ์ด์ƒ์„ ๊ฐ•๋ ฅํžˆ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

์‹œ์ž‘ํ•˜๊ธฐ (Getting Started)

์„ค์น˜ ๋ฐ ์—…๋ฐ์ดํŠธ

EstreUI๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ๋ณต์ œ(clone)ํ•˜๊ฑฐ๋‚˜ ํฌํฌ(fork)ํ•˜์—ฌ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. ์—…๋ฐ์ดํŠธ๋ฅผ ์œ„ํ•ด์„œ๋Š” ์—…์ŠคํŠธ๋ฆผ(upstream) ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์—์„œ ํ’€(pull)์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์•„๋ž˜ ๊ธฐ์ดˆ ๊ตฌํ˜„์ด ํฌํ•จ๋œ ์˜ˆ์ œ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ์ œ ์›น ์•ฑ 1 (preview) / (Github)

Estre UI ๋ฐ๋ชจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜

APT. (preview) / (Github)

ํŒŒ์ผ ๊ตฌ์กฐ

  • serviceLoader.html: ์„œ๋น„์Šค ์›Œ์ปค ๋กœ๋” (์•ฑ ์‹คํ–‰ ์ „ ์—…๋ฐ์ดํŠธ ์ง„ํ–‰).
  • scripts/: ํ•ต์‹ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฐ ๋กœ์ง.
    • estreUi.js: ๋ฉ”์ธ ํ”„๋ ˆ์ž„์›Œํฌ ์ฝ”๋“œ.
    • estreU0EE0Z.js: Estre Common ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ.
    • main.js: ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ง„์ž…์  ๋ฐ ์„ค์ •.
  • styles/: ํ”„๋ ˆ์ž„์›Œํฌ ๋ฐ ์•ฑ์„ ์œ„ํ•œ CSS ํŒŒ์ผ.
  • index.html: ๋ฉ”์ธ ์ง„์ž…์  ("Rim").
  • fixedTop.html, fixedBottom.html, mainMenu.html, staticDoc.html, instantDoc.html, managedOverlay.html: ๋ ˆ์ด์•„์›ƒ์„ ์œ„ํ•œ ๋‚ด๋ณด๋‚ด์ง„ ์„น์…˜๋“ค.

ํ•ต์‹ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

  • JCODD: ๊ฐ•๋ ฅํ•œ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ JSON ๋Œ€์ฒด ํฌ๋งท ๋ฐ ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ.
  • Doctre.js: DOM ์กฐ์ž‘ ๋ฐ ๋ฌธ์„œ ๊ด€๋ฆฌ ํ—ฌํผ.
  • Modernism.js: ์ตœ์‹  ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ธฐ๋Šฅ ํด๋ฆฌํ•„ ๋ฐ ์ง€์›.
  • Alienise.js: ์ด์งˆ์ ์ธ ์‹œ์Šคํ…œ ๊ฐ„(์˜ˆ: Web <-> Native)์˜ ํ†ต์‹ ์„ ์œ„ํ•œ ๋ธŒ๋ฆฟ์ง€.
  • estreU0EE0Z.js: EstreUI๋ฅผ ์œ„ํ•œ ๊ณตํ†ต ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ฐ ๊ธฐ๋ณธ ํด๋ž˜์Šค.

์ดˆ๊ธฐ ์ปค์Šคํ…€ ๊ฐ€์ด๋“œ

์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•  ๋•Œ ๋‹ค์Œ ์‚ฌํ•ญ๋“ค์„ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:

  1. ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ: index.html์˜ <title>, <meta name="description">, Open Graph (OG) ํƒœ๊ทธ ์—…๋ฐ์ดํŠธ.
  2. ์•„์ด์ฝ˜ ๋ฐ ๋งค๋‹ˆํŽ˜์ŠคํŠธ: favicon.ico, images/ ๋ฐ /vectors/ ํด๋”์˜ ์•ฑ ์•„์ด์ฝ˜ ๊ต์ฒด ๋ฐ webmanifest.json ์—…๋ฐ์ดํŠธ.
  3. ๋ ˆ์ด์•„์›ƒ: ํ—ค๋”๋ฅผ ์œ„ํ•œ fixedTop.html๊ณผ ๋„ค๋น„๊ฒŒ์ด์…˜์„ ์œ„ํ•œ mainMenu.html ์ˆ˜์ •.
  4. ํ…Œ๋งˆ: ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ์— ๋งž์ถฐ styles/main.css ์ˆ˜์ •.
  5. ๋ฉ”์ธ ์Šคํฌ๋ฆฝํŠธ: scripts/main.js ์ˆ˜์ •.
  6. PWA: serviceLoader.html์—์„œ ์„œ๋น„์Šค ์›Œ์ปค ๋กœ๋” ์„ค์ •(๋ฉ”์‹œ์ง€ ๋ฐ ์ƒ‰์ƒ) ์—…๋ฐ์ดํŠธ ๋ฐ serviceWorker.js์˜ ๊ตฌ์„ฑ ํŒŒ์ผ ๋ชฉ๋ก ๋ฐ ๋ฒ„์ „ ์ˆ˜์ •.

ํ•ต์‹ฌ ๊ฐœ๋… (Core Concepts)

ํŽ˜์ด์ง€ ์‹œ์Šคํ…œ

์„น์…˜ ๋ธ”๋ก(๋ ˆ์ด์–ด) ๊ตฌ์„ฑ

EstreUI๋Š” ์ฝ˜ํ…์ธ  ๋ ˆ์ด์–ด ์˜์—ญ์ด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‚˜๋‰ฉ๋‹ˆ๋‹ค. ์•„๋ž˜์— ์žˆ๋Š” ํ•ญ๋ชฉ์ด ์œ„์— ์žˆ๋Š” ํ•ญ๋ชฉ์„ ๋ฎ์Šต๋‹ˆ๋‹ค:

  • MainSections(StaticDoc): ์ƒ/ํ•˜๋‹จ ๊ณ ์ • UI์™€ ์„ธํŠธ๋˜๋Š” UI ์˜์—ญ. PID๊ฐ€ &m์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.
  • FooterSections(FixedBottom): ํ•˜๋‹จ ๊ณ ์ • rootbar UI ์˜์—ญ. PID๊ฐ€ &f์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค. (ํ˜„์žฌ๋Š” ์‚ฌ์šฉ๋˜์ง€ ์•Š์Œ)
  • MenuSections(MainMenu): ์ขŒ/์šฐ์ธก ์Šฌ๋ผ์ด๋”ฉ ๋“œ๋กœ์–ด ๋ฉ”๋‰ด ์˜์—ญ. PID๊ฐ€ &u์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.
  • HeaderSections(FixedTop): ์ƒ๋‹จ ๊ณ ์ • appbar UI ์˜์—ญ. PID๊ฐ€ &h์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.
  • BlindedSections(InstantDoc): ๊ณ ์ • UI๋ฅผ ๋ฎ๋Š” UI ํŽ˜์ด์ง€ ์˜์—ญ. PID๊ฐ€ &b์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.
  • OverlaySections(ManagedOverlay): ์ตœ์ƒ๋‹จ ์˜ค๋ฒ„๋ ˆ์ด ์˜์—ญ. PID๊ฐ€ &o์œผ๋กœ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.

ํŽ˜์ด์ง€ ๊ตฌ์„ฑ

EstreUI๋Š” ์ฝ˜ํ…์ธ ๋ฅผ ๊ณ„์ธต์ ์œผ๋กœ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค:

  • Component(section): ์ตœ์ƒ์œ„ ํŽ˜์ด์ง€. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ตฌ์„ฑ ์ƒ ๊ธฐ๋Šฅ์ ์œผ๋กœ ๋ถ„๋ฆฌ๋œ ํŽ˜์ด์ง€ ๋ฌถ์Œ ๋‹จ์œ„. staticDoc์˜ ๊ฒฝ์šฐ fixedBottom์˜ ํƒญ๊ณผ ๋งค์นญ. staticDoc์˜ ๊ธฐ๋ณธ ์ปดํฌ๋„ŒํŠธ๋Š” home id๋ฅผ ๊ฐ€์ง. PID์—์„œ =ํ”„๋ฆฌํ”ฝ์Šค๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.
  • Container: ์ปจํ…Œ์ด๋„ˆ ํŽ˜์ด์ง€. ์ฃผ๋กœ ํ™”๋ฉด ๋‹จ์œ„์˜ ์ฃผ์š” ๊ธฐ๋Šฅ ์˜์—ญ์„ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ๊ธฐ๋ณธ ์ปจํ…Œ์ด๋„ˆ๋Š” root id๋ฅผ ๊ฐ€์ง. PID์—์„œ #ํ”„๋ฆฌํ”ฝ์Šค๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.
  • Article: ์‹ค์ œ ํŽ˜์ด์ง€ ์ฝ˜ํ…์ธ . ์ฃผ๋กœ ํ™”๋ฉด ๋˜๋Š” ์š”์†Œ ๋‹จ์œ„์˜ ์ปจํ…์ธ ๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ๊ธฐ๋ณธ ์•„ํ‹ฐํด์€ main id๋ฅผ ๊ฐ€์ง. PID์—์„œ @ํ”„๋ฆฌํ”ฝ์Šค๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.
    • ๋‹ค์ค‘ ์•„ํ‹ฐํด ์ง€์›: ํƒœ๋ธ”๋ฆฟ์˜ ๋ถ„ํ•  ํ™”๋ฉด์ฒ˜๋Ÿผ ์—ฌ๋Ÿฌ ์•„ํ‹ฐํด์„ ๋™์‹œ์— ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์œผ๋‚˜, ๋ ˆ์ด์•„์›ƒ์— ์ผ๋ถ€ ์ œํ•œ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

ํŽ˜์ด์ง€ ์œ ํ˜•

EstreUI๋Š” ํŽ˜์ด์ง€๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ตฌ๋ถ„ํ•ฉ๋‹ˆ๋‹ค:

  • Static: ์ •์  ํŽ˜์ด์ง€. Estre UI ์ดˆ๊ธฐํ™” ์ค‘ ํŽ˜์ด์ง€ ๋“ฑ๋ก ์‹œ ์š”์†Œ๊ฐ€ ์‚ญ์ œ๋˜์ง€ ์•Š๊ณ  ์œ ์ง€๋˜๋ฉฐ, closePage()๋กœ ๋‹ซ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. PID๊ฐ€ $s๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. (ํ˜ธ์ถœ ์‹œ ์ƒ๋žต ๊ฐ€๋Šฅ)
  • Instant: ์ธ์Šคํ„ดํŠธ ํŽ˜์ด์ง€. Estre UI ์ดˆ๊ธฐํ™” ์ค‘ ํŽ˜์ด์ง€ ๋“ฑ๋ก ํ›„ ์š”์†Œ๊ฐ€ ์‚ญ์ œ๋˜๋ฉฐ, ๋ณ„๋„๋กœ bringPage()ํ˜ธ์ถœ์„ ํ•  ๋•Œ ๋กœ๋“œ๋ฉ๋‹ˆ๋‹ค. closePage()๋กœ ๋‹ซ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. PID๊ฐ€ $i๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. (ํ˜ธ์ถœ ์‹œ ์ƒ๋žต ๊ฐ€๋Šฅ)
    • Multi instance: ๊ฐ™์€ ํŽ˜์ด์ง€ ๊ตฌํ˜„์„ ๋‹ค๋ฅธ ๋‚ด์šฉ์œผ๋กœ ๋™์‹œ์— ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. PID ๋์— ^๋ฅผ ํ”„๋ฆฌํ”ฝ์Šค๋กœ ํ•˜๋Š” instance origin id๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. (** ํ˜„์žฌ ๋ฏธ๊ตฌํ˜„์ž…๋‹ˆ๋‹ค.)

PID (Page ID)

๋„ค๋น„๊ฒŒ์ด์…˜์€ ๋”ฅ๋งํฌ๋‚˜ ๋ผ์šฐํŠธ์™€ ์œ ์‚ฌํ•œ PID๋ฅผ ํ†ตํ•ด ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.

  • ํ˜•์‹: $s&m=component#container#article ๋˜๋Š” ์ •์˜๋œ ๋ณ„์นญ(alias).
  • ์˜ˆ์‹œ: customPageManager.bringPage("dashboard") ๋˜๋Š” pageManager.bringPage("*dashboard") ๋˜๋Š” pageManager.bringPage("&b=main#dashboard").
  • ๋“ฑ๋ก๋œ PID ๋ชฉ๋ก์€ pageManager.pages๋ฅผ ํ†ตํ•ด ํ™•์ธ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ผ์ดํ”„์‚ฌ์ดํด

EstreUI ํŽ˜์ด์ง€๋Š” Android Activity์™€ ์œ ์‚ฌํ•œ ๋šœ๋ ทํ•œ ๋ผ์ดํ”„์‚ฌ์ดํด์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค:

  1. onBring: ํŽ˜์ด์ง€๊ฐ€ ์ค€๋น„๋˜๋Š” ์ค‘์ž…๋‹ˆ๋‹ค. Active struct๊ฐ€ ํ˜ธ์ถœ๋˜๊ธฐ ์ด์ „์ด๋ฏ€๋กœ ๊ฐ์ข… handle ๋“ฑ์„ ํฌํ•จํ•˜๋Š” element ์ƒ์„ฑ ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  2. onOpen: ํŽ˜์ด์ง€๊ฐ€ ์—ด๋ฆฌ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค (์ „ํ™˜ ์‹œ์ž‘). 1ํšŒ๋งŒ ํ˜ธ์ถœ๋ฉ๋‹ˆ๋‹ค.
  3. onShow: ํŽ˜์ด์ง€๊ฐ€ ์™„์ „ํžˆ ๋ณด์ž…๋‹ˆ๋‹ค.
  4. onHide: ํŽ˜์ด์ง€๊ฐ€ ์ˆจ๊ฒจ์กŒ์Šต๋‹ˆ๋‹ค (๋‹ค๋ฅธ ํŽ˜์ด์ง€์— ๊ฐ€๋ ค์ง€๊ฑฐ๋‚˜ ๋‹ซํž˜).
  5. onClose: ํŽ˜์ด์ง€๊ฐ€ ๋‹ซํ˜”์Šต๋‹ˆ๋‹ค. 1ํšŒ๋งŒ ํ˜ธ์ถœ๋ฉ๋‹ˆ๋‹ค.
  6. onRelease: ํŽ˜์ด์ง€ ๋ฆฌ์†Œ์Šค๊ฐ€ ํ•ด์ œ๋ฉ๋‹ˆ๋‹ค.
  • onBack: Back navigation์ด ํ˜ธ์ถœ๋  ๋•Œ ์‹คํ–‰๋˜๋ฉฐ, true๋ฅผ ๋ฐ˜ํ™˜ํ•  ๊ฒฝ์šฐ ๊ธฐ๋ณธ ์ž‘๋™์ด ์ทจ์†Œ๋ฉ๋‹ˆ๋‹ค.

  • onReload: ํŽ˜์ด์ง€๋ฅผ ์ƒˆ๋กœ๊ณ ์นจํ•˜๋ ค๊ณ  ํ•  ๋•Œ ํ˜ธ์ถœ๋ฉ๋‹ˆ๋‹ค. true๋ฅผ ๋ฐ˜ํ™˜ํ•  ๊ฒฝ์šฐ ๊ธฐ๋ณธ ์ž‘๋™์ด ์ทจ์†Œ๋ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ ์ž‘๋™์€ ํ•ด๋‹น ํŽ˜์ด์ง€๋ฅผ ๋‹ซ์€ ํ›„ ๋‹ค์‹œ ์—ด์–ด์ฃผ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

  • onIntentUpdated: ์ด๋ฏธ ํ™œ์„ฑํ™”๋œ ํŽ˜์ด์ง€๊ฐ€ ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ(Intent)๋ฅผ ๋ฐ›์„ ๋•Œ ํ˜ธ์ถœ๋ฉ๋‹ˆ๋‹ค.

  • onApplied: ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ์„ ์œ„ํ•ด apply()๊ฐ€ ํ˜ธ์ถœ๋  ๋•Œ ์ž‘์—… ํ›„ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

ํŽ˜์ด์ง€ ํ•ธ๋“ค(Page handle) & ํŽ˜์ด์ง€ ํ•ธ๋“ค๋Ÿฌ(Page handler)

  • Handle: DOM ์š”์†Œ ๋˜๋Š” UI ์ปจํŠธ๋กค๋Ÿฌ์ž…๋‹ˆ๋‹ค. handler์• ์„œ๋Š” ๋ผ์ดํ”„์‹ธ์ดํด์˜ handle ๊ทธ ์™ธ์—๋Š” this.handle๋กœ ์ ‘๊ทผํ•ฉ๋‹ˆ๋‹ค.
  • Handler: ํŽ˜์ด์ง€๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๋กœ์ง ํด๋ž˜์Šค(EstrePageHandler)์ž…๋‹ˆ๋‹ค. handle.handler๋กœ ์ ‘๊ทผํ•ฉ๋‹ˆ๋‹ค.
  • handle.component, handle.container๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ƒ์œ„ ํ•ญ๋ชฉ์˜ ํ•ธ๋“ค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • component.containers, container.articles๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ•˜์œ„ ํ•ญ๋ชฉ์˜ ํ•ธ๋“ค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๊ทธ ์™ธ ์ ‘๊ทผ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ estreUi์˜ mainSections, blindedSections๋“ฑ์„ ํ†ตํ•˜์—ฌ ๋‹ค๋ฅธ ์„น์…˜์˜ ํ•ธ๋“ค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ํ•ญ๋ชฉ์€ ์†Œ์Šค ๊ตฌํ˜„์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
  • ๊ฐ ํŽ˜์ด์ง€์˜ ์—˜๋ฆฌ๋จผํŠธ ๊ฐ์ฒด์—์„œ ์ ‘๊ทผ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ element.pageHandle๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํŠนํžˆ ๋ธŒ๋ผ์šฐ์ €์˜ developer tools์˜ console๋กœ ์ ‘๊ทผํ•˜๋ ค๋Š” ๊ฒฝ์šฐ ์š”์†Œ ํƒญ์—์„œ component/container/article ์š”์†Œ๋ฅผ ์„ ํƒํ•œ ํ›„ $0.pageHandle๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ & Intent

  • Intent: ํŽ˜์ด์ง€ ๊ฐ„์— ์ „๋‹ฌ๋˜๋Š” ๋ฐ์ดํ„ฐ ๊ฐ์ฒด์ž…๋‹ˆ๋‹ค. handle.intent๋‚˜ handler.intent๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Intent Data: handle.intent.data๋‚˜ handler.intentData๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Intent Action: ๊ฐ ๋ผ์ดํ”„์‹ธ์ดํด์— ํ•ด๋‹นํ•˜๋Š” ์‹œ์ ์— ์ˆ˜ํ–‰๋˜๋Š” ๋™์ž‘์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์†Œ์Šค ๊ตฌํ˜„์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
    • ์‹คํ–‰ ์‹œ์ : onBring, onOpen, onShow์˜ ๊ฒฝ์šฐ ๋ผ์ดํ”„์‹ธ์ดํด์˜ ์ฝœ๋ฐฑ์ด ์‹คํ–‰ ๋œ ์ดํ›„์— ์ˆ˜ํ–‰๋˜๋ฉฐ, onHide, onClose, onRelease์˜ ๊ฒฝ์šฐ ๋ผ์ดํ”„์‹ธ์ดํด์˜ ์ฝœ๋ฐฑ์ด ์‹คํ–‰ ๋˜๊ธฐ ์ด์ „์— ์ˆ˜ํ–‰๋ฉ๋‹ˆ๋‹ค.
  • Active Struct: data-bind-* ์†์„ฑ์„ ํ†ตํ•œ ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ local-style, solid-point, handles, passive-links ๋“ฑ ๋™์  ์š”์†Œ๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ํฌ๊ด„์ ์ธ ์‹œ์Šคํ…œ์ž…๋‹ˆ๋‹ค. ์ดˆ๊ธฐํ™” ์‹œ์ (์ฃผ๋กœ onBring ์ „ํ›„)๊ณผ intentData๊ฐ€ ์ˆ˜์ •๋  ๋•Œ ์ž๋™์œผ๋กœ ์‹คํ–‰๋˜์–ด UI๋ฅผ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค. ํ•„์š”์— ๋”ฐ๋ผ ์ˆ˜๋™์œผ๋กœ ์‹คํ–‰ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Apply: ๋‹ค์ˆ˜์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ํ•œ๋ฒˆ์— ์ ์šฉ๋˜๋Š” ๊ฒฝ์šฐ handle.apply(data)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐ ๋ณ€๊ฒฝ์ด ๋ฐœ์ƒํ•  ๋•Œ ๋งˆ๋‹ค applyActiveStruce()๊ฐ€ ์‹คํ–‰ ๋˜๋Š”๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ณ  ๋ณ€๊ฒฝ์ด ์™„๋ฃŒ ๋œ ํ›„์— ํ•œ๋ฒˆ๋งŒ ์‹คํ–‰๋˜๋„๋ก ํ•˜์—ฌ ์˜ค๋ฒ„ํ—ค๋“œ๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•ธ๋“ค(handle) (EstreHandle ํด๋ž˜์Šค ํ™•์žฅ)

  • Article ํŽ˜์ด์ง€ ๋‚ด ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ์œ„ํ•œ ๊ฒƒ์ด ํ•ธ๋“ค์ž…๋‹ˆ๋‹ค.
  • HTML ์ŠคํŠธ๋Ÿญ์ฒ˜ ๋‚ด UIS(UI spceifier)์— ๋”ฐ๋ผ ๋งค์นญ๋˜๋Š” ํ•ธ๋“ค์ด onBring ์ดํ›„ ์‹œ์ ์— ์ดˆ๊ธฐํ™”๋ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ ์ œ๊ณต ํ•ธ๋“ค

  • EstreUnifiedCalendarHandle, EstreDedicatedCalanderHandle ๋“ฑ์˜ ๊ธฐ๋ณธ ์ œ๊ณต ํ•ธ๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ํ•ญ๋ชฉ์€ estreUi.js์˜ EstreHandle ํด๋ž˜์Šค์— ๊ธฐ๋ณธ ๋“ฑ๋ก๋œ ํด๋ž˜์Šค๋“ค์„ ์ฐธ์กฐํ•˜์„ธ์š”.

์‚ฌ์šฉ์ž ์ •์˜ ํ•ธ๋“ค

  • Estre UI์˜ ์ดˆ๊ธฐํ™” ์ „์— ์ง์ ‘ ๊ตฌํ˜„ํ•œ ํ•ธ๋“ค์„ ๋“ฑ๋กํ•˜์—ฌ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์‚ฌํ•ญ์€ estreUi.js์˜ EstreHandle ํด๋ž˜์Šค์˜ ๊ตฌํ˜„์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.

ํ•ธ๋“ค๋Ÿฌ(handler) (์ง์ ‘ ํด๋ž˜์Šค ๊ตฌํ˜„)

  • ํ•„์š”์— ๋”ฐ๋ผ ํŠน์ • ์ž‘๋™์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ตฌํ˜„์„ ํ•ธ๋“ค๋Ÿฌ๋ผ๊ณ  ์นญํ•ฉ๋‹ˆ๋‹ค.
  • ์ฃผ๋กœ ํŽ˜์ด์ง€ ์‹œ์ž‘ ์ฝœ๋ฐฑ ์ค‘์— ์ดˆ๊ธฐํ™”ํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ ์ œ๊ณต ํ•ธ๋“ค๋Ÿฌ

  • EstreSwipeHandler, EstreDraggableHandler ๋“ฑ์˜ ๊ธฐ๋ณธ ์ œ๊ณต ํ•ธ๋“ค๋Ÿฌ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ํ•ญ๋ชฉ์€ estreUi.js์˜ // handlers ์ฃผ์„ ์•„๋ž˜์— ๊ธฐ๋ณธ ๋“ฑ๋ก๋œ ํด๋ž˜์Šค๋“ค์„ ์ฐธ์กฐํ•˜์„ธ์š”.

์‚ฌ์šฉ์ž ์ •์˜ ํ•ธ๋“ค๋Ÿฌ

  • ํ•ธ๋“ค๋Ÿฌ์˜ ๊ตฌํ˜„์€ ํ˜•์‹์ด ๋”ฐ๋กœ ์—†์œผ๋ฏ€๋กœ ์ž์œ ๋กญ๊ฒŒ ๊ตฌํ˜„ํ•˜์—ฌ ์‚ฌ์šฉํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

Exported Sections

ํ—ค๋”(fixedTop)๋‚˜ ์ •์  ์ฝ˜ํ…์ธ (staticDoc)์™€ ๊ฐ™์€ ๋ ˆ์ด์•„์›ƒ ๋ถ€๋ถ„์€ index.html์„ ๊น”๋”ํ•˜๊ฒŒ ์œ ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ๋ณ„๋„์˜ HTML ํŒŒ์ผ์—์„œ ๋กœ๋“œ๋ฉ๋‹ˆ๋‹ค.

index.html์— ์ง์ ‘ ์ž‘์„ฑํ•œ ์‚ฌํ•ญ์€ ๊ฐ ํŒŒ์ผ์˜ ๋‚ด์šฉ์˜ ๋’ค์— ์œ„์น˜ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

ํ•„์š”์— ๋”ฐ๋ผ(๋กœ์ปฌ ์‹คํ–‰์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ ๋“ฑ) data-exported="1"์˜ 1์„ ์ง€์šฐ๊ฑฐ๋‚˜ ์†์„ฑ์„ ์ œ๊ฑฐํ•˜์—ฌ ๋ณ„๋„ ํŒŒ์ผ์˜ AJAX ๋กœ๋“œ๋ฅผ ํ•˜์ง€ ์•Š๊ณ  index.html์— ์ง์ ‘ ์ž‘์„ฑํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


UI/UX ๋ฐ ์œ ํ‹ธ๋ฆฌํ‹ฐ

UI ๋ชจ๋“œ

  • ์Šคํฌ๋กค ๋ฐฉ์‹:
    • vfv_scroll: fixedTop ๋ฐ fixedBottom์˜ ํฌ๊ธฐ๋งŒํผ inset์ด ์ถ”๊ฐ€๋˜๋Š” ์Šคํฌ๋กค.
    • sv_scroll: inset์ด ์—†๋Š” ํ‘œ์ค€ ์Šคํฌ๋กค.
    • txv_scroll, bxv_scroll: ์ƒ๋‹จ ๋˜๋Š” ํ•˜๋‹จ inset ๋งŒ ์ถ”๊ฐ€๋˜๋Š” ์Šคํฌ๋กค.
  • ์•„ํ‹ฐํด ๋ชจ๋“œ:
    • fwvs: Full Width Vertical Scroll (์ „์ฒด ๋„ˆ๋น„ ์„ธ๋กœ ์Šคํฌ๋กค).
    • limit_on_screen: ํŽ˜์ด์ง€ ํญ์„ ๋ชจ๋ฐ”์ผ ์ˆ˜์ค€์œผ๋กœ ์ œํ•œ.
      • fixed_height, full_height, max_height: ๋†’์ด ์ œํ•œ ๋ชจ๋“œ ์„ค์ •. estreUiCore2.css ๊ตฌํ˜„ ์ฐธ์กฐ.

๋ ˆ์ด์•„์›ƒ ์œ ํ‹ธ๋ฆฌํ‹ฐ

  • Flex ํ”„๋ฆฌ์…‹: line_block (ํ–‰), inline_block, lines_block (์—ด).
  • Inset ์œ ํ‹ธ๋ฆฌํ‹ฐ: ์ผ๊ด€๋œ ๊ฐ„๊ฒฉ์„ ์œ„ํ•œ inset_on_margin, inset_on_padding, inset_on_gap.

๋Œ€ํ™”์ƒ์ž ๋Œ€์ฒด

๊ธฐ๋ณธ ๋ธŒ๋ผ์šฐ์ € ๊ฒฝ๊ณ ์ฐฝ์€ ์ฐจ๋‹จ์ ์ด๊ณ  ๋ฏธ๋ คํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. EstreUI๋Š” ๋น„์ฐจ๋‹จ ๋Œ€์•ˆ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค:

  • estreAlert(message): ๊ธฐ๋ณธ alert ํ˜ธ์ถœ์€ ์ด ํ•จ์ˆ˜๋กœ ๋Œ€์ฒด๋ฉ๋‹ˆ๋‹ค.
  • estreConfirm(message, callback): ๊ธฐ๋ณธ confirm ํ˜ธ์ถœ์€ ์ด ํ•จ์ˆ˜๋กœ ๋Œ€์ฒด๋ฉ๋‹ˆ๋‹ค.
  • estrePrompt(message, callback): ๊ธฐ๋ณธ prompt ํ˜ธ์ถœ์€ ์ด ํ•จ์ˆ˜๋กœ ๋Œ€์ฒด๋ฉ๋‹ˆ๋‹ค.
  • ๋ ˆ๊ฑฐ์‹œ ํ˜ธ์ถœ: ๊ผญ ํ•„์š”ํ•œ ๊ฒฝ์šฐ classicAlert๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • estreToast*: ํ™”๋ฉด ํ•˜๋‹จ์— ๋ถ€์ฐฉ๋œ ํ˜•ํƒœ์˜ ๋‹ค์ด์–ผ๋กœ๊ทธ ํ˜•์‹ ๋˜ํ•œ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค. alert, confirm, prompt์™€ ๋™์ผํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜๋ฉฐ ์ปค์Šคํ…€ ๋‹ค์ด์–ผ๋กœ๊ทธ ๋˜ํ•œ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์†Œ์Šค ๊ตฌํ˜„์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
  • note(message): ์•ˆ๋“œ๋กœ์ด๋“œ์˜ Toast์™€ ๋น„์Šทํ•œ ํ˜•์‹์˜ ๋ฉ”์‹œ์ง€ ์ถœ๋ ฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • wait(), go(), stedy(): ์ „์—ญ ๋กœ๋”ฉ ์ธ๋””์ผ€์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•˜๊ฑฐ๋‚˜ ์ˆจ๊น๋‹ˆ๋‹ค.

์Šคํ† ๋ฆฌ์ง€ ์‹œ์Šคํ…œ

  • Async Storage: Local/Session Storage๊ตฌํ˜„๊ณผ ์ผ์น˜ํ•˜๋Š” ๋น„๋™๊ธฐ ์Šคํ† ๋ฆฌ์ง€์šฉ prototype ๊ตฌํ˜„์ž…๋‹ˆ๋‹ค.
  • Native Storage: WVCA4EUI์—์„œ ์‹คํ–‰ ์‹œ ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ ์ €์žฅ์†Œ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • Account/Device Storage: ๋ฐฑ์—”๋“œ์™€ ์—ฐ๋™๋œ ๋ฐ์ดํ„ฐ (๊ณ„์ •๋ณ„/๊ธฐ๊ธฐ๋ณ„ ์ €์žฅ์†Œ). ์ด ๋ถ€๋ถ„์€ ์ž์ฒด API์™€ ์—ฐ๋™ํ•˜์—ฌ async storage๋ฅผ ์ง์ ‘ ๊ตฌํ˜„ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  • Codded Storage: JCODD ์ง๋ ฌํ™”/์—ญ์ง๋ ฌํ™”๋ฅผ ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ์Šคํ† ๋ฆฌ์ง€ ๊ตฌํ˜„์ž…๋‹ˆ๋‹ค.

์ „์—ญ alias ๊ฐ์ฒด

  • uis: UI specifier alias ๋ชจ์Œ.
  • eds: Element dataset name alias ๋ชจ์Œ.

๋กœ์ปฌ ์Šคํƒ€์ผ (Local Style)

EstreUI๋Š” Article ํŽ˜์ด์ง€ ์š”์†Œ ๋‚ด์—์„œ <local-style> ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šค์ฝ”ํ”„๋œ ์Šคํƒ€์ผ๋ง์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ธฐ๋Šฅ์€ Active Struct ์‹œ์Šคํ…œ์˜ ์ผ๋ถ€๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.

  • ์‚ฌ์šฉ๋ฒ•: ํŽ˜์ด์ง€ ์š”์†Œ ๋‚ด๋ถ€์— <local-style> ํƒœ๊ทธ๋ฅผ ๋ฐฐ์น˜ํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฒฝ๋กœ ์น˜ํ™˜: ์Šคํƒ€์ผ ๋‚ด์šฉ ๋‚ด์—์„œ ##์„ ์‚ฌ์šฉํ•˜๋ฉด ํ•ด๋‹น ์ง€์ ๊นŒ์ง€์˜ ๊ฒฝ๋กœ๋กœ ์น˜ํ™˜๋ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ํŠน์ • ์š”์†Œ ๊ณ„์ธต์— ํ•œ์ •๋œ ์Šคํƒ€์ผ์„ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ž‘๋™ ์›๋ฆฌ: ํ”„๋ ˆ์ž„์›Œํฌ๋Š” ์ž๋™์œผ๋กœ <local-style>์„ ํ‘œ์ค€ <style> ํƒœ๊ทธ๋กœ ๋ณ€ํ™˜ํ•˜๋ฉฐ, ##์„ ํ•ด๋‹น ์š”์†Œ์˜ ์‹ค์ œ CSS ์„ ํƒ์ž ๊ฒฝ๋กœ๋กœ ์น˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

๊ฐœ๋ฐœ ์‹œ ์ฃผ์˜์‚ฌํ•ญ (Development Cautions)

iOS ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ

  • ์ด์Šˆ: iOS 15+(ํŠนํžˆ 15)๋Š” ์›น ์•ฑ์— ๋Œ€ํ•œ ์—„๊ฒฉํ•œ ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํฐ CSS ํŒŒ์ผ์€ ์•ฑ ์ถฉ๋Œ์ด๋‚˜ ๋กœ๋“œ ์‹คํŒจ๋ฅผ ์œ ๋ฐœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํ•ด๊ฒฐ์ฑ…:
    • ์Šคํ”Œ๋ž˜์‹œ ํ™”๋ฉด์— ํ•„์š”ํ•œ CSS๋งŒ ๋ถ„๋ฆฌํ•˜์„ธ์š”.
    • ๋‚˜๋จธ์ง€ CSS(๋ฌด๊ฑฐ์šด ํฐํŠธ ํฌํ•จ)๋Š” Lazy Loading (<meta link="lazy" ...>)์„ ์‚ฌ์šฉํ•˜์„ธ์š”.
    • ์Šคํฌ๋ฆฝํŠธ ๋กœ๋”ฉ ์‹œ defer ์†์„ฑ์„ ์‚ฌ์šฉํ•˜์„ธ์š”.
    • exported section html (staticDoc.html ๋“ฑ) ํŒŒ์ผ์— html์„ ๊ตฌํ˜„ํ•˜์—ฌ ์‚ฌ์šฉํ•˜์„ธ์š”.

์‚ฌ์šฉ ์˜ˆ์ œ (Usage Examples)

๋ง๊ณ ํด๋ž˜์Šค (Estre UI๊ฐ€ ๋ผ์ด๋ธŒ ์ฝ”๋“œ๋กœ ๊ฐœ๋ฐœ๋˜๋Š” ์•ฑ)

๋ณต์žกํ•œ ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ, ๋‹ค์ค‘ ํŽ˜์ด์ง€ ์ปจํ…Œ์ด๋„ˆ, ๋™์  ์ฝ˜ํ…์ธ ๋ฅผ ๊ฐ–์ถ˜ ๊ต์œก์šฉ ์•ฑ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.

  • ํ•ต์‹ฌ ํŒจํ„ด: AppPagesProvider๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PID๋ฅผ ํŠน์ • ํ•ธ๋“ค๋Ÿฌ์— ๋งคํ•‘ํ•˜๋Š” ๊ด‘๋ฒ”์œ„ํ•œ ์‚ฌ์šฉ.
  • Application link: ๋ง๊ณ ํด๋ž˜์Šค

๊ด€๋งน๋™๊ฐ (์œ ํ‹ธ๋ฆฌํ‹ฐ ์•ฑ)

์ ์ž ๋ทฐ์–ด ์œ ํ‹ธ๋ฆฌํ‹ฐ์ž…๋‹ˆ๋‹ค.

  • ํ•ต์‹ฌ ํŒจํ„ด: ํŒŒ์ผ ์ฒ˜๋ฆฌ ๋ฐ ๊ฐ„๋‹จํ•œ UI ๊ตฌ์กฐ. ๋กœ์ปฌ์—์„œ ํŒŒ์ผ ์ž…๋ ฅ์„ ์ฒ˜๋ฆฌํ•˜๊ณ  ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
  • Application link: ๊ด€๋งน๋™๊ฐ
  • Github repository: https://github.com/Esterkxz/GMDG

๊ณตํ†ต ํŒจํ„ด

  • index.html: ๋ผˆ๋Œ€(Skeleton).
  • AppPagesProvider: ๋ผ์šฐํ„ฐ ์„ค์ •.
  • EstrePageHandler: ๊ฐ ํŽ˜์ด์ง€์˜ ์ปจํŠธ๋กค๋Ÿฌ.

๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๊ฐ€์ด๋“œ (Migration Guide)

Classic Web (ASP/PHP/JSP) -> EstreUI

  • SSR ํ•˜์ด๋ธŒ๋ฆฌ๋“œ: ์ดˆ๊ธฐ ๋กœ๋“œ(staticDoc)์—๋Š” ์—ฌ์ „ํžˆ ์„œ๋ฒ„ ์‚ฌ์ด๋“œ ๋ Œ๋”๋ง์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, ์ฒ˜์Œ ์‹คํ–‰ ์‹œ ์ตœ์ดˆ 1ํšŒ๋งŒ ๋กœ๋“œ๋˜๋ฏ€๋กœ SPA ๊ฒฝํ—˜์„ ์œ ์ง€ํ•˜๋ ค๋ฉด ๊ฐ ํŽ˜์ด์ง€์˜ ์ปจํ…์ธ  ๋ฐ ๋„ค๋น„๊ฒŒ์ด์…˜์€ AJAX/Fetch๋กœ ์ฒ˜๋ฆฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  • AJAX: ํผ ์ œ์ถœ๊ณผ ํŽ˜์ด์ง€ ์ƒˆ๋กœ๊ณ ์นจ์„ fetch ํ˜ธ์ถœ๊ณผ EstreUI์˜ ํŽ˜์ด์ง€ ์ „ํ™˜์œผ๋กœ ๋Œ€์ฒดํ•˜์„ธ์š”.

Native App -> EstreUI

  • WVCA4EUI: ์ด Flutter ๊ธฐ๋ฐ˜ ๋ž˜ํผ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ EstreUI ์•ฑ์„ ์•ฑ ์Šคํ† ์–ด์šฉ์œผ๋กœ ํŒจํ‚ค์ง•ํ•˜์„ธ์š”.
    • ๊ธฐ๋Šฅ: ๋„ค์ดํ‹ฐ๋ธŒ ๊ธฐ๋Šฅ์„ ์œ„ํ•œ ๋ธŒ๋ฆฟ์ง€๋ฅผ ์ œ๊ณตํ•˜๊ณ , PWA ์บ์‹ฑ์„ ์ฒ˜๋ฆฌํ•˜๋ฉฐ, ์›น๋ทฐ ๋ผ์ดํ”„์‚ฌ์ดํด์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
    • Bridge Handler: ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๊ฐ€ Flutter ์ฝ”๋“œ๋ฅผ ํ˜ธ์ถœํ•˜๊ฑฐ๋‚˜ ๊ทธ ๋ฐ˜๋Œ€๋กœ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค.

About

Estre UI sample app 1

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •