Images, Flashs, Javascripts, CSSs and other resources

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Images, Flashs, Javascripts, CSSs and other resources

Bruno Borges
I've seen some threads in the mailing-list archive, and for I understand, there's no common way to deal with resources like those in the subject.

Could you guys please list what's the best approaches to deal with images, so programmers and designers can work together without any problem? I wanna see developers coding the html files, and designers specifying images in these pages, so the images can be displayed in the same way at development time (WYSIWYG HTML Editors) and at runtime.

The same question for javascript files (.js) and stylesheet files (.css).

And after that, we could put all information together and submit to the Wiki.

Thank you!

--
Bruno Borges - SCJP 1.4
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Martijn Dashorst
Administrator
There are several possibilities here.

Dynamic approach
Needed in the following cases:
 - resource needs to be generated
 - resource comes from external, non-web system (database, etc)
 - resource must be filtered (component id's subsitution, etc)
 - resource must be packaged with your component

Static approach
Needed in the following cases:
 - absolute performance requirements -> static resources served by webserver, not servlet
 - static files, no special requirement for dynamic content
 - ?

In the dynamic approach the resources need either to be registered at load time (this will change I think), or generated on the fly as needed. Resource source files should be available on the classpath, but need not be (provide your own resolver).

In the static approach, you put the files in the webroot and thus have them available to link from your pages.

com.foo.Index.html
<html>
<head>
<style src="style/style.css" type="text/css"></style>
<script src="prototype/prototype.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>

and directories:

src/webapp/style/style.css
src/webapp/prototype/prototype.js
src/webapp/WEB-INF/web.xml
src/main/java/com/foo/Index.html
src/main/java/com/foo/Index.java

Not complete, but a start.

Martijn

On 3/17/06, Bruno Borges <[hidden email]> wrote:
I've seen some threads in the mailing-list archive, and for I understand, there's no common way to deal with resources like those in the subject.

Could you guys please list what's the best approaches to deal with images, so programmers and designers can work together without any problem? I wanna see developers coding the html files, and designers specifying images in these pages, so the images can be displayed in the same way at development time (WYSIWYG HTML Editors) and at runtime.

The same question for javascript files (.js) and stylesheet files (.css).

And after that, we could put all information together and submit to the Wiki.

Thank you!

--
Bruno Borges - SCJP 1.4
[hidden email]



--
Wicket 1.2 - Write AJAX applications without writing JavaScript
http://wicketframework.org
Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Bruno Borges
In reply to this post by Bruno Borges
In the case of static resources, the problem is that, as you show, if my web designer opens the Index.html he'll not see the images in his WYSIWYG editor.

Thanks.

From: "Martijn Dashorst" <[hidden email]>
To: [hidden email]
Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and other resources
Reply-To: [hidden email]

There are several possibilities here.

Dynamic approach
Needed in the following cases:
 - resource needs to be generated
 - resource comes from external, non-web system (database, etc)
 - resource must be filtered (component id's subsitution, etc)
 - resource must be packaged with your component

Static approach
Needed in the following cases:
 - absolute performance requirements -> static resources served by
webserver, not servlet
 - static files, no special requirement for dynamic content
 - ?

In the dynamic approach the resources need either to be registered at load
time (this will change I think), or generated on the fly as needed. Resourc=
e
source files should be available on the classpath, but need not be (provide
your own resolver).

In the static approach, you put the files in the webroot and thus have them
available to link from your pages.

com.foo.Index.html
<html>
<head>
<style src=3D"style/style.css" type=3D"text/css"></style>
<script src=3D"prototype/prototype.js" type=3D"text/javascript"></script>
</head>
<body>
</body>
</html>

and directories:

src/webapp/style/style.css
src/webapp/prototype/prototype.js
src/webapp/WEB-INF/web.xml
src/main/java/com/foo/Index.html
src/main/java/com/foo/Index.java

Not complete, but a start.

Martijn

On 3/17/06, Bruno Borges <[hidden email]> wrote:
>
> I've seen some threads in the mailing-list archive, and for I understand,
> there's no common way to deal with resources like those in the subject.
>
> Could you guys please list what's the best approaches to deal with images=
,
> so programmers and designers can work together without any problem? I wan=
na
> see developers coding the html files, and designers specifying images in
> these pages, so the images can be displayed in the same way at developmen=
t

> time (WYSIWYG HTML Editors) and at runtime.
>
> The same question for javascript files (.js) and stylesheet files (.css).
>
> And after that, we could put all information together and submit to the
> Wiki.
>
> Thank you!
>
> --
> Bruno Borges - SCJP 1.4
> [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Thomas Singer-4
Hi Bruno,

I'm with you. Please take a look at issue 1448195 in the wicket tracker
(http://sourceforge.net/tracker/index.php?func=detail&aid=1448195&group_id=119783&atid=684978).

--
Best regards,
Thomas Singer


Bruno Borges schrieb:

> In the case of static resources, the problem is that, as you show, if my
> web designer opens the Index.html he'll not see the images in his
> WYSIWYG editor.
>
> Thanks.
>
>     From: "Martijn Dashorst" <[hidden email]
>     <mailto:[hidden email]>>
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and
>     other resources
>     Reply-To: [hidden email]
>     <mailto:[hidden email]>
>
>     There are several possibilities here.
>
>     Dynamic approach
>     Needed in the following cases:
>      - resource needs to be generated
>      - resource comes from external, non-web system (database, etc)
>      - resource must be filtered (component id's subsitution, etc)
>      - resource must be packaged with your component
>
>     Static approach
>     Needed in the following cases:
>      - absolute performance requirements -> static resources served by
>     webserver, not servlet
>      - static files, no special requirement for dynamic content
>      - ?
>
>     In the dynamic approach the resources need either to be registered
>     at load
>     time (this will change I think), or generated on the fly as needed.
>     Resourc=
>     e
>     source files should be available on the classpath, but need not be
>     (provide
>     your own resolver).
>
>     In the static approach, you put the files in the webroot and thus
>     have them
>     available to link from your pages.
>
>     com.foo.Index.html
>     <html>
>     <head>
>     <style src=3D"style/style.css" type=3D"text/css"></style>
>     <script src=3D"prototype/prototype.js"
>     type=3D"text/javascript"></script>
>     </head>
>     <body>
>     </body>
>     </html>
>
>     and directories:
>
>     src/webapp/style/style.css
>     src/webapp/prototype/prototype.js
>     src/webapp/WEB-INF/web.xml
>     src/main/java/com/foo/Index.html
>     src/main/java/com/foo/Index.java
>
>     Not complete, but a start.
>
>     Martijn
>
>     On 3/17/06, Bruno Borges <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      >
>      > I've seen some threads in the mailing-list archive, and for I
>     understand,
>      > there's no common way to deal with resources like those in the
>     subject.
>      >
>      > Could you guys please list what's the best approaches to deal
>     with images=
>     ,
>      > so programmers and designers can work together without any
>     problem? I wan=
>     na
>      > see developers coding the html files, and designers specifying
>     images in
>      > these pages, so the images can be displayed in the same way at
>     developmen=
>     t
>      > time (WYSIWYG HTML Editors) and at runtime.
>      >
>      > The same question for javascript files (.js) and stylesheet files
>     (.css).
>      >
>      > And after that, we could put all information together and submit
>     to the
>      > Wiki.
>      >
>      > Thank you!
>      >
>      > --
>      > Bruno Borges - SCJP 1.4
>      > [hidden email] <mailto:[hidden email]>
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Dirk Markert
Why don't you include
 
</wicket:remove>

in your html head.
 
Dirk
 
2006/3/18, Thomas Singer <[hidden email]>:
Hi Bruno,

I'm with you. Please take a look at issue 1448195 in the wicket tracker
( http://sourceforge.net/tracker/index.php?func=detail&aid=1448195&group_id=119783&atid=684978).

--
Best regards,
Thomas Singer


Bruno Borges schrieb:

> In the case of static resources, the problem is that, as you show, if my
> web designer opens the Index.html he'll not see the images in his
> WYSIWYG editor.
>
> Thanks.
>
>     From: "Martijn Dashorst" <[hidden email]
>     <mailto:[hidden email]>>
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and
>     other resources
>     Reply-To: [hidden email]
>     <mailto:[hidden email] >
>
>     There are several possibilities here.
>
>     Dynamic approach
>     Needed in the following cases:
>      - resource needs to be generated
>      - resource comes from external, non-web system (database, etc)
>      - resource must be filtered (component id's subsitution, etc)
>      - resource must be packaged with your component
>
>     Static approach
>     Needed in the following cases:
>      - absolute performance requirements -> static resources served by
>     webserver, not servlet
>      - static files, no special requirement for dynamic content
>      - ?
>
>     In the dynamic approach the resources need either to be registered
>     at load
>     time (this will change I think), or generated on the fly as needed.
>     Resourc=
>     e
>     source files should be available on the classpath, but need not be
>     (provide
>     your own resolver).
>
>     In the static approach, you put the files in the webroot and thus
>     have them
>     available to link from your pages.
>
>     com.foo.Index.html
>     <html>
>     <head>

>     <style src=3D"style/style.css" type=3D"text/css"></style>
>     <script src=3D"prototype/prototype.js"
>     type=3D"text/javascript"></script>
>     </head>
>     <body>
>     </body>
>     </html>
>
>     and directories:
>
>     src/webapp/style/style.css
>     src/webapp/prototype/prototype.js
>     src/webapp/WEB-INF/web.xml
>     src/main/java/com/foo/Index.html
>     src/main/java/com/foo/Index.java
>
>     Not complete, but a start.
>
>     Martijn
>
>     On 3/17/06, Bruno Borges < [hidden email]
>     <mailto:[hidden email]>> wrote:
>      >
>      > I've seen some threads in the mailing-list archive, and for I
>     understand,
>      > there's no common way to deal with resources like those in the
>     subject.
>      >
>      > Could you guys please list what's the best approaches to deal
>     with images=
>     ,
>      > so programmers and designers can work together without any
>     problem? I wan=
>     na
>      > see developers coding the html files, and designers specifying
>     images in
>      > these pages, so the images can be displayed in the same way at
>     developmen=
>     t
>      > time (WYSIWYG HTML Editors) and at runtime.
>      >
>      > The same question for javascript files (.js) and stylesheet files
>     (.css).
>      >
>      > And after that, we could put all information together and submit
>     to the
>      > Wiki.
>      >
>      > Thank you!
>      >
>      > --
>      > Bruno Borges - SCJP 1.4
>      > [hidden email] <mailto:[hidden email]>
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Bruno Borges
In reply to this post by Bruno Borges
We could do that, only if all the web pages stay in the same package, but imagine that in a modularized project or even with sub-modules!

So, how about some code like this:

class IndexPage extends WebPage {

    public String getResourcePage() {
        return "Index.html";
    }
}

And to complete:

class PetShopApp extends WebApplication {

    public String getPagesRootPath() {
        return "/WEB-INF/html/";
    }
}

Regards,
Bruno Borges

Date: Mon, 20 Mar 2006 08:56:30 +0100
From: "Dirk Markert" <[hidden email]>
To: [hidden email]
Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and other resources
Reply-To: [hidden email]

------=_Part_9855_22859891.1142841390656
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Why don't you include

<wicket:remove>
<base href=3D" file:///C:/Docs%20and%20Settings/you/your-project/src/webap=
p/"
/>
</wicket:remove>

in your html head.

Dirk

2006/3/18, Thomas Singer <[hidden email]>:
>
> Hi Bruno,
>
> I'm with you. Please take a look at issue 1448195 in the wicket tracker
> (
> http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1448195&grou=
p_id=3D119783&atid=3D684978
> ).
>
> --
> Best regards,
> Thomas Singer
>
>
> Bruno Borges schrieb:
> > In the case of static resources, the problem is that, as you show, if m=
y

> > web designer opens the Index.html he'll not see the images in his
> > WYSIWYG editor.
> >
> > Thanks.
> >
> >     From: "Martijn Dashorst" <[hidden email]
> >     <mailto:[hidden email]>>
> >     To: [hidden email]
> >     <mailto:[hidden email]>
> >     Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and
> >     other resources
> >     Reply-To: [hidden email]
> >     <mailto:[hidden email]>
> >
> >     There are several possibilities here.
> >
> >     Dynamic approach
> >     Needed in the following cases:
> >      - resource needs to be generated
> >      - resource comes from external, non-web system (database, etc)
> >      - resource must be filtered (component id's subsitution, etc)
> >      - resource must be packaged with your component
> >
> >     Static approach
> >     Needed in the following cases:
> >      - absolute performance requirements -> static resources served by
> >     webserver, not servlet
> >      - static files, no special requirement for dynamic content
> >      - ?
> >
> >     In the dynamic approach the resources need either to be registered
> >     at load
> >     time (this will change I think), or generated on the fly as needed.
> >     Resourc=3D
> >     e
> >     source files should be available on the classpath, but need not be
> >     (provide
> >     your own resolver).
> >
> >     In the static approach, you put the files in the webroot and thus
> >     have them
> >     available to link from your pages.
> >
> >     com.foo.Index.html
> >     <html>
> >     <head>
> >     <style src=3D3D"style/style.css" type=3D3D"text/css"></style>
> >     <script src=3D3D"prototype/prototype.js"

> >     type=3D3D"text/javascript"></script>
> >     </head>
> >     <body>
> >     </body>
> >     </html>
> >
> >     and directories:
> >
> >     src/webapp/style/style.css
> >     src/webapp/prototype/prototype.js
> >     src/webapp/WEB-INF/web.xml
> >     src/main/java/com/foo/Index.html
> >     src/main/java/com/foo/Index.java
> >
> >     Not complete, but a start.
> >
> >     Martijn
> >
> >     On 3/17/06, Bruno Borges < [hidden email]
> >     <mailto:[hidden email]>> wrote:
> >      >
> >      > I've seen some threads in the mailing-list archive, and for I
> >     understand,
> >      > there's no common way to deal with resources like those in the
> >     subject.
> >      >
> >      > Could you guys please list what's the best approaches to deal
> >     with images=3D
> >     ,
> >      > so programmers and designers can work together without any
> >     problem? I wan=3D
> >     na
> >      > see developers coding the html files, and designers specifying
> >     images in
> >      > these pages, so the images can be displayed in the same way at
> >     developmen=3D
> >     t
> >      > time (WYSIWYG HTML Editors) and at runtime.
> >      >
> >      > The same question for javascript files (.js) and stylesheet file=
s

> >     (.css).
> >      >
> >      > And after that, we could put all information together and submit
> >     to the
> >      > Wiki.
> >      >
> >      > Thank you!
> >      >
> >      > --
> >      > Bruno Borges - SCJP 1.4
> >      > [hidden email] <mailto:[hidden email]>

--
Bruno Borges - SCJP 1.4
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Images, Flashs, Javascripts, CSSs and other resources

Dirk Markert
Bruno,
 
I am not getting your point. I was talking about static resources at design time. Like you mentioned it before. What kind of problems do you see with web pages from different packages?
 
Dirk

 
2006/3/20, Bruno Borges <[hidden email]>:
We could do that, only if all the web pages stay in the same package, but imagine that in a modularized project or even with sub-modules!

So, how about some code like this:

class IndexPage extends WebPage {

    public String getResourcePage() {
        return "Index.html";
    }
}

And to complete:

class PetShopApp extends WebApplication {

    public String getPagesRootPath() {
        return "/WEB-INF/html/";
    }
}

Regards,
Bruno Borges

 
Date: Mon, 20 Mar 2006 08:56:30 +0100
From: "Dirk Markert" <[hidden email]>
To: [hidden email]
Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and other resources
Reply-To: [hidden email]

------=_Part_9855_22859891.1142841390656
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Why don't you include

<wicket:remove>
<base href=3D" file:///C:/Docs%20and%20Settings/you/your-project/src/webap=
p/"
/>
</wicket:remove>

in your html head.

Dirk

2006/3/18, Thomas Singer <[hidden email]>:
>
> Hi Bruno,
>
> I'm with you. Please take a look at issue 1448195 in the wicket tracker
> (
> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://sourceforge.net/tracker/index.php?func=3Ddetail&amp;aid=3D1448195&amp;grou=" target="_blank"> http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1448195&grou=
p_id=3D119783&atid=3D684978
> ).
>
> --
> Best regards,
> Thomas Singer
>
>
> Bruno Borges schrieb:
> > In the case of static resources, the problem is that, as you show, if m=
y

> > web designer opens the Index.html he'll not see the images in his
> > WYSIWYG editor.
> >
> > Thanks.
> >
> >     From: "Martijn Dashorst" < [hidden email]
> >     <mailto:[hidden email]>>
> >     To: [hidden email]
> >     <mailto:[hidden email]>

> >     Subject: Re: [Wicket-user] Images, Flashs, Javascripts, CSSs and
> >     other resources
> >     Reply-To: [hidden email]
> >     <mailto:[hidden email]>
> >
> >     There are several possibilities here.
> >
> >     Dynamic approach
> >     Needed in the following cases:
> >      - resource needs to be generated
> >      - resource comes from external, non-web system (database, etc)
> >      - resource must be filtered (component id's subsitution, etc)
> >      - resource must be packaged with your component
> >
> >     Static approach
> >     Needed in the following cases:
> >      - absolute performance requirements -> static resources served by
> >     webserver, not servlet
> >      - static files, no special requirement for dynamic content
> >      - ?
> >
> >     In the dynamic approach the resources need either to be registered
> >     at load
> >     time (this will change I think), or generated on the fly as needed.
> >     Resourc=3D
> >     e
> >     source files should be available on the classpath, but need not be
> >     (provide
> >     your own resolver).
> >
> >     In the static approach, you put the files in the webroot and thus
> >     have them
> >     available to link from your pages.
> >
> >     com.foo.Index.html
> >     <html>
> >     <head>
> >     <style src=3D3D"style/style.css" type=3D3D"text/css"></style>
> >     <script src=3D3D"prototype/prototype.js"
> >     type=3D3D"text/javascript"></script>

> >     </head>
> >     <body>
> >     </body>
> >     </html>
> >
> >     and directories:
> >
> >     src/webapp/style/style.css
> >     src/webapp/prototype/prototype.js
> >     src/webapp/WEB-INF/web.xml
> >     src/main/java/com/foo/Index.html
> >     src/main/java/com/foo/Index.java
> >
> >     Not complete, but a start.
> >
> >     Martijn
> >
> >     On 3/17/06, Bruno Borges < [hidden email]
> >     <mailto:[hidden email]>> wrote:
> >      >
> >      > I've seen some threads in the mailing-list archive, and for I
> >     understand,
> >      > there's no common way to deal with resources like those in the
> >     subject.
> >      >
> >      > Could you guys please list what's the best approaches to deal
> >     with images=3D
> >     ,
> >      > so programmers and designers can work together without any
> >     problem? I wan=3D
> >     na
> >      > see developers coding the html files, and designers specifying
> >     images in
> >      > these pages, so the images can be displayed in the same way at
> >     developmen=3D
> >     t
> >      > time (WYSIWYG HTML Editors) and at runtime.
> >      >
> >      > The same question for javascript files (.js) and stylesheet file=
s

> >     (.css).
> >      >
> >      > And after that, we could put all information together and submit
> >     to the
> >      > Wiki.
> >      >
> >      > Thank you!
> >      >
> >      > --
> >      > Bruno Borges - SCJP 1.4
> >      > [hidden email] <mailto:[hidden email]>

--
Bruno Borges - SCJP 1.4
[hidden email]