语言

Menu
Sites
Language
About tizen web development js framework

The following syntax is uses what js framework ?    Not nodejs and angularjs, I'm not familiar with this syntax

Thanks everyone

 

define({
    name: 'app',
    requires: [
        'views/initPage'
    ],
    def: function appInit() {
        'use strict';
        /**
         * Initiates module.
         */
        function init() {
            console.log('app::init');
        }
        return {
            init: init
        };
    }
});

响应

8 回复
Marco Buettner

RequireJS

YONG LEI

I did not find the project in the RequireJS library

AVSukhov

Hello,

In which project you found this syntax?

As say Marco it looks like RequireJs. Tizen supports RequireJS framework.

Seoghyun Kang

Hello,

 

I think that you watched the sample web application in the Tizen SDK.

It did not use the nodejs and angularjs. :)

 

To hide unnecessary complexity and properly encapsulate functionalities, the some sample web applications are using a simple MVP (Model-View-Presenter) architecture. There will be a core part which will determine the module structure and the loading mechanism and also provide common functions in the form of reusable modules and an application part which will implement the specific app behavior.

 

Core.js implements simple AMD (Asynchronous Module Definition) and specifies module defining. Modules definition organizes code into simple units (modules). Module can refer to other modules – dependency references.

 

The code of the applications is placed in the following directories

  • views – contains code related to the UI (Presenter component of the MVP architecture)
  • models – contains code related to business logic (Model component of the architecture)
  • helpers – contains additional reusable functions not suitable for other directories
  • templates – contains HTML templates (View component of the MVP architecture)

 

Please refer it.

Thanks.

YONG LEI

yes, i watched the sample web application in the Tizen SDK.. 

 I am a wearable device developer, I have a lot of questions, such as network requests, events, pass parameters, tag.js file Description.

These have not found the answer in tizen.org, I'm developing an application very Difficult

Seoghyun Kang

Dear YONG LEI,

 

I understand. It is not easy.

If you have any question, please register the each questions at the forum. If possible, I gave you the feedback. 

It will be beneficial to others.

 

Thanks.

AVSukhov

Hello,

As say Seoghyun Kang, the best way, if you have certain question, create new topic on forum.

Forum`s user can help you.

YONG LEI

thanks everyone