ANN: Build a WebServer in 5 minutes
- From: "Danijel Tkalcec" <dtkalcec@xxxxxxxxxxx>
- Date: Thu, 12 May 2005 10:47:16 +0200
Using RealThinClient components, you can build your WebServer in 5 minutes:
1. Open a new Project
2. from the RTC Server tab, put RtcDataServer component on your form
3. for RtcDataServer1, set ServerPort = 80
4. for your Form, define OnCreate event:
RtcDataServer1.Listen;
5. from the RTC Server tab, put RtcDataProvider component on your form
6. for RtcDataProvider1, set Server = RtcDataServer1
7. for RtcDataProvider1, define OnCheckRequest event:
with TRtcDataServer(Sender) do
if UpperCase(Request.FileName)='/TIME' then Accept;
8. for RtcDataProvider1, define OnDataAvailable event:
with TRtcDataServer(Sender) do
if Request.Complete then
Write('Current time is: '+TimeToStr(Now));
9. Compile and Run the project.
Using a web browser, go to http://localhost/time
and you will get a response like "Current time is: 23:15:38"
To add more content to your server, repeat steps 5 to 8.
RealThinClient is a set of easy-to-use components for writing
internet-enabled applications using any Delphi version (even the personal
edition) and BCB. No other components are needed. It even comes with a
ready-to-use WebServer implementation comparable to Appache, supporting
PHP5.
RTC Core 1.1 contains:
* RTC Core 1.1 Server components:
- TRtcUDPServer
- TRtcTCPServer
- TRtcDataServer
- TRtcDataServerLink
- TRtcDataProvider
- TRtcServerModule
* RTC Core 1.1 Client components:
- TRtcUDPClient
- TRtcTCPClient
- TRtcDataClient
- TRtcDataClientLink
- TRtcDataRequest
- TRtcClientModule
* RTC Core 1.1 Remote Function components:
- TRtcFunction
- TRtcFunctionGroup
- TRtcResult
* RTC Core 1.1 Value objects:
- TRtcValue
- TRtcArray
- TRtcRecord
- TRtcDataSet
- TRtcFunctionInfo
Some information about RTC Core 1.1 :
----------------------------------------
* Complete package: You don't need to buy the Enterprise version of Delphi
or BCB, nor upgrade to the latest Delphi/BCB version to use RealThinClient
components. All RTC components compile with standard editions of Delphi and
BCB, starting from Delphi 4.
* True RAD: Everything you do with RTC is component-based, while all the
code you will ever need to write is defined as events, so you can truly
design your server and your client applications, without the need to use
wizzards or code your interfaces.
* Multi-Threading: A very sophisticated Threading mechanism is built into
all RTC Connection components, which allows thousands of active connections
to be running in separate threads, all at the same time. And the only thing
you need to do is change a simple MultiThreaded property to True. Then, any
newly received connection will be handled by a thread pooling mechanism
which saves valuable System resources, while enabling nearly unlimited
number of symultaneous connections at the same time.
* Uses Proxys: Data Clients will never have to be specialy configured to get
through corporate firewalls to reach the server. Simply by setting the
UseProxy property to True, DataClient connection will use a connection
provider which uses the same settings as Internet Explorer for browsing the
Web. This means that Clients can work in any corporate LAN and have full
access to the internet.
* Non-Blocking: Other than most other internet components, RTC connection
components are non-blocking and event-driven. This means that, even when not
using a multithreaded mode, your users will not be blocked ("Application Not
Responding") during communication between your client and the server. For
each state change in the connection, there is an event that will be
triggered.
* Remote Functions: Implementing and using remote functions is as easy as
writing local functions. You just place a RtcFunction component on your Form
or a DataModule, set function name and write your OnExecute event. OnExecute
event receives the Connection object, Function Parameters and a Result
object. You just have to use the parameters passed to the function to
prepare the result. The rest is done "under the hood" by RealThinClient
components.
* Strong Encryption: RTC components offer easy-to-use strong encryption with
Encryption Keys of variable length. And you don't even have to think about
the keys to use, they will be generated and maintained for you. Also, for
remote functions, it makes no difference wether function parameters and
result are transmitted using a secure encrypted connection or just plain
text, it is marely a parameter you define for your Server- and Client-Module
components.
* Use/Write Plug-Ins: All Client and Server code you write using RTC Core is
ready to be used as building blocks or plug-ins in any application that uses
RTC Core. For example, you can combine a WebServer, Messenger server,
Application server, Database server and your own functions in one Data
Server, even when those components weren't specialy designed to share the
same Server space. Because of the easy-to-use plug-in framework on top of
which all RTC Components are built, you can link unlimited number of
functionality and data providing components like DataProvider, ServerModule
and/or DataLink to one DataServer, enhancing that server's functionality
with each new component. And by keeping code in separate units
(DataModules), you can even provide your own plug-ins (and sell those
plug-ins) to anyone who uses the RTC Core Library.
* Small footprint: A complete WebServer implementation, using RTC Core
components, is less than 600 KBytes when compiled with D7. Even though it is
so small, it offers enough functionality with great stability and
scalability.
Free evaluation version of RTC Core 1.1 is now available.
For more information on RealThinClient components, check:
www.realthinclient.com
(powered by the RTC DataService)
Best Regards,
Danijel Tkalcec
.
- Follow-Ups:
- Re: Build a WebServer in 5 minutes
- From: Robert
- Re: Build a WebServer in 5 minutes
- Prev by Date: Re: Good Licensing (for Nick Rollas)
- Next by Date: Re: Serial Comms
- Previous by thread: Re: Good Licensing (for Nick Rollas)
- Next by thread: Re: Build a WebServer in 5 minutes
- Index(es):
Relevant Pages
|