[Spark View Engine] #43: Create a sample for medium-trust deployment

1 view
Skip to first unread message

Spark View Engine

unread,
Aug 27, 2008, 3:03:23 AM8/27/08
to spar...@googlegroups.com
#43: Create a sample for medium-trust deployment
---------------------------+------------------------------------------------
Reporter: louis.dejardin | Owner:
Type: task | Status: new
Priority: major | Component: Spark Core
Keywords: |
---------------------------+------------------------------------------------
From http://groups.google.com/group/spark-
dev/browse_thread/thread/27756d6b4cd53428

This will probably be a precomiled assembly to deploy and load at run-
time. Maybe a post-build step? At that point I don't think you'd even need
to deploy the spark files.

It also sounds like the situation is one where the web app would use
SparkViewEngine to instantiate the AbstractSparkView/ISparkView based
views directly rather than use one of the framework-specific libraries. So
it could be a sample of doing that as well.

--
Ticket URL: <http://dev.dejardin.org/trac/spark/ticket/43>
Spark View Engine <http://dev.dejardin.org/trac/spark>
Spark View Engine

Igor Loginov (aka ilog2000)

unread,
Aug 27, 2008, 1:32:18 PM8/27/08
to Spark View Engine Dev
Louis,

You're great. Just a couple of days after the request... like a hare
pulled out from the hat. Thank you.

I haven't taken a look at sources yet, but have read your blog post
about complexities with castle version. I'd suggest to use a global
dictionary to be filled in on compilation stage for _all_ spark files

private readonly Dictionary<string, DateTime> _fileTimestamps = new
Dictionary<string, DateTime>();
...
foreach (string inputFile in inputFiles)
{
_fileTimestamps[inputFile] = File.GetLastWriteTime(inputFile);
}

and a method

public void RecompileIfChanged(...)
{
lock (_sync)
{
foreach (KeyValuePair<string, DateTime> inputFile in
_fileTimestamps)
{
if (File.GetLastWriteTime(inputFile.Key) > inputFile.Value)
{
CompileView(...);
break;
}
}
}
}

The idea - to keep timestamps of all "compilable" files on developer's
side to recompile them on demand but switch this feature off in
production environment (web.config setting ?).

Hope this helps.


On Aug 27, 9:03 am, "Spark View Engine" <louis.dejar...@gmail.com>
wrote:
> #43: Create a sample for medium-trust deployment
> ---------------------------+-----------------------------------------------­-

Spark View Engine

unread,
Aug 28, 2008, 5:56:53 PM8/28/08
to spar...@googlegroups.com
#43: Create a sample for medium-trust deployment
-----------------------------+----------------------------------------------
Reporter: louis.dejardin | Owner:
Type: task | Status: closed
Priority: major | Component: Spark Core
Resolution: fixed | Keywords:
-----------------------------+----------------------------------------------
Changes (by louis.dejardin):

* status: new => closed
* resolution: => fixed

Comment:

There are three samples in the next release which will show precompilation
for medium trust. One for each framework and one for using spark in a web
app directly.

--
Ticket URL: <http://dev.dejardin.org/trac/spark/ticket/43#comment:1>
Reply all
Reply to author
Forward
0 new messages