|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Should I write a service?app I'm about to start. I'm writing a small and simple label design application, users will define text fields on the label in a GUI, some data may come from a database. The application will be able to connect to any standard database in time, but for the time being it's access. I will need to 'bolt' this application into many other applications as time goes by, these applications will all require label printing functionality, but I don't want to include the designer code everytime, so I'll just add the EXE and DLL's required to the install set. The problem starts when the user actually wants to print a label. I don't want the designer to load, so I need something sitting in the background that will pick up the print instructions. I'm thinking that I need a seperate EXE that will poll a folder location for print requests, or create a service that will do the polling. Where my knowledge ends is passing data to an EXE or a Service, not something I have had to do before. Can anyone share any experiences of this kind of thing? Cheers, Tull.
Show quote
Hide quote
"TClancey" <t***@idcodeware.co.uk> wrote in message To pass data to an exe is as simply as "shelling out" and executing the news:Xd-dnaxFavfbUd3YRVnyug@bt.com... > Hi all. I hope someone can give me a few pointers on 'best practice' for > an app I'm about to start. > > I'm writing a small and simple label design application, users will define > text fields on the label in a GUI, some data may come from a database. > > The application will be able to connect to any standard database in time, > but for the time being it's access. > > I will need to 'bolt' this application into many other applications as > time goes by, these applications will all require label printing > functionality, but I don't want to include the designer code everytime, so > I'll just add the EXE and DLL's required to the install set. > > The problem starts when the user actually wants to print a label. I don't > want the designer to load, so I need something sitting in the background > that will pick up the print instructions. > > I'm thinking that I need a seperate EXE that will poll a folder location > for print requests, or create a service that will do the polling. > > Where my knowledge ends is passing data to an EXE or a Service, not > something I have had to do before. > > Can anyone share any experiences of this kind of thing? > > Cheers, > Tull. > command. For something like a service, though, is probably a bit harder. Something that can be done is have a configuration file somewhere on the local machine, and have the service read this configuration file (XML good choice, IMO), and go from there. <shrug> just an idea :) HTH, Mythran Yeah, this is kind of what I'm thinking. I also think a service may be a
little over the top for this app, it doesn't have to be running all the time. Cheers, Tull. Show quoteHide quote "Mythran" <kip_pot***@hotmail.com> wrote in message news:eau43xR%23GHA.4356@TK2MSFTNGP05.phx.gbl... > > > "TClancey" <t***@idcodeware.co.uk> wrote in message > news:Xd-dnaxFavfbUd3YRVnyug@bt.com... >> Hi all. I hope someone can give me a few pointers on 'best practice' for >> an app I'm about to start. >> >> I'm writing a small and simple label design application, users will >> define text fields on the label in a GUI, some data may come from a >> database. >> >> The application will be able to connect to any standard database in time, >> but for the time being it's access. >> >> I will need to 'bolt' this application into many other applications as >> time goes by, these applications will all require label printing >> functionality, but I don't want to include the designer code everytime, >> so I'll just add the EXE and DLL's required to the install set. >> >> The problem starts when the user actually wants to print a label. I >> don't want the designer to load, so I need something sitting in the >> background that will pick up the print instructions. >> >> I'm thinking that I need a seperate EXE that will poll a folder location >> for print requests, or create a service that will do the polling. >> >> Where my knowledge ends is passing data to an EXE or a Service, not >> something I have had to do before. >> >> Can anyone share any experiences of this kind of thing? >> >> Cheers, >> Tull. >> > > To pass data to an exe is as simply as "shelling out" and executing the > command. For something like a service, though, is probably a bit harder. > Something that can be done is have a configuration file somewhere on the > local machine, and have the service read this configuration file (XML good > choice, IMO), and go from there. <shrug> just an idea :) > > HTH, > Mythran > > Tull,
As Mythran suggests having the UI tell the service what to do can be tricky. In addition to polling a folder location, you can use .NET Remoting (or the newer WCF (Windows Communication Foundation)) to have the UI tell the service to print a label. I would consider .NET Remoting over polling a folder In a corporation I would consider using MSMQ (either the System.Messaging namespace or even the newer WCF over MSMQ) to allow multiple machines to queue requests for labels to print. MSMQ is especially useful if you have multiple machines requesting labels, but only one machine/printer printing said labels. NOTE: WCF is part of .NET 3.0 due out when Vista ships ..NET 2.0 includes an IpcChannel that allows one to limit .NET remoting to a single machine. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "TClancey" <t***@idcodeware.co.uk> wrote in message news:Xd-dnaxFavfbUd3YRVnyug@bt.com... > Hi all. I hope someone can give me a few pointers on 'best practice' for > an app I'm about to start. > > I'm writing a small and simple label design application, users will define > text fields on the label in a GUI, some data may come from a database. > > The application will be able to connect to any standard database in time, > but for the time being it's access. > > I will need to 'bolt' this application into many other applications as > time goes by, these applications will all require label printing > functionality, but I don't want to include the designer code everytime, so > I'll just add the EXE and DLL's required to the install set. > > The problem starts when the user actually wants to print a label. I don't > want the designer to load, so I need something sitting in the background > that will pick up the print instructions. > > I'm thinking that I need a seperate EXE that will poll a folder location > for print requests, or create a service that will do the polling. > > Where my knowledge ends is passing data to an EXE or a Service, not > something I have had to do before. > > Can anyone share any experiences of this kind of thing? > > Cheers, > Tull. > Oh! I should add, Do you really need a separate EXE (service or otherwise)
to print a label, I would consider simply including that logic directly in the same assembly that does the label UI. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "TClancey" <t***@idcodeware.co.uk> wrote in message news:Xd-dnaxFavfbUd3YRVnyug@bt.com... > Hi all. I hope someone can give me a few pointers on 'best practice' for > an app I'm about to start. > > I'm writing a small and simple label design application, users will define > text fields on the label in a GUI, some data may come from a database. > > The application will be able to connect to any standard database in time, > but for the time being it's access. > > I will need to 'bolt' this application into many other applications as > time goes by, these applications will all require label printing > functionality, but I don't want to include the designer code everytime, so > I'll just add the EXE and DLL's required to the install set. > > The problem starts when the user actually wants to print a label. I don't > want the designer to load, so I need something sitting in the background > that will pick up the print instructions. > > I'm thinking that I need a seperate EXE that will poll a folder location > for print requests, or create a service that will do the polling. > > Where my knowledge ends is passing data to an EXE or a Service, not > something I have had to do before. > > Can anyone share any experiences of this kind of thing? > > Cheers, > Tull. > Thanks for the info.
I had thought of Writing the whole package and calling the EXE differently for design and print mode, but it's likely that the designer will be used infrequently. I don't want the designer to be doing too much, like polling in the background, so I think two apps is the way to go. Again, thanks. Tull. Show quoteHide quote "Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message news:8B7A4DF7-16ED-4D6E-A3B2-0E019D291208@microsoft.com... > Oh! I should add, Do you really need a separate EXE (service or otherwise) > to print a label, I would consider simply including that logic directly in > the same assembly that does the label UI. > > -- > Hope this helps > Jay B. Harlow > .NET Application Architect, Enthusiast, & Evangelist > T.S. Bradley - http://www.tsbradley.net > > > "TClancey" <t***@idcodeware.co.uk> wrote in message > news:Xd-dnaxFavfbUd3YRVnyug@bt.com... >> Hi all. I hope someone can give me a few pointers on 'best practice' for >> an app I'm about to start. >> >> I'm writing a small and simple label design application, users will >> define text fields on the label in a GUI, some data may come from a >> database. >> >> The application will be able to connect to any standard database in time, >> but for the time being it's access. >> >> I will need to 'bolt' this application into many other applications as >> time goes by, these applications will all require label printing >> functionality, but I don't want to include the designer code everytime, >> so I'll just add the EXE and DLL's required to the install set. >> >> The problem starts when the user actually wants to print a label. I >> don't want the designer to load, so I need something sitting in the >> background that will pick up the print instructions. >> >> I'm thinking that I need a seperate EXE that will poll a folder location >> for print requests, or create a service that will do the polling. >> >> Where my knowledge ends is passing data to an EXE or a Service, not >> something I have had to do before. >> >> Can anyone share any experiences of this kind of thing? >> >> Cheers, >> Tull. >> > Tull,
Designer aside. What I am asking is the why does the act of printing need to defer to another application. If Application1 says "print it", why doesn't Application1 simply print it, why have Application1 queue the request to print it so that Application2 needs to print it. -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "TClancey" <t***@idcodeware.co.uk> wrote in message news:p-SdnV0ipfLbTdjYRVnyuA@bt.com... > Thanks for the info. > > I had thought of Writing the whole package and calling the EXE differently > for design and print mode, but it's likely that the designer will be used > infrequently. I don't want the designer to be doing too much, like > polling in the background, so I think two apps is the way to go. > > Again, thanks. > Tull. > > "Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message > news:8B7A4DF7-16ED-4D6E-A3B2-0E019D291208@microsoft.com... >> Oh! I should add, Do you really need a separate EXE (service or >> otherwise) to print a label, I would consider simply including that logic >> directly in the same assembly that does the label UI. >> >> -- >> Hope this helps >> Jay B. Harlow >> .NET Application Architect, Enthusiast, & Evangelist >> T.S. Bradley - http://www.tsbradley.net >> >> >> "TClancey" <t***@idcodeware.co.uk> wrote in message >> news:Xd-dnaxFavfbUd3YRVnyug@bt.com... >>> Hi all. I hope someone can give me a few pointers on 'best practice' >>> for an app I'm about to start. >>> >>> I'm writing a small and simple label design application, users will >>> define text fields on the label in a GUI, some data may come from a >>> database. >>> >>> The application will be able to connect to any standard database in >>> time, but for the time being it's access. >>> >>> I will need to 'bolt' this application into many other applications as >>> time goes by, these applications will all require label printing >>> functionality, but I don't want to include the designer code everytime, >>> so I'll just add the EXE and DLL's required to the install set. >>> >>> The problem starts when the user actually wants to print a label. I >>> don't want the designer to load, so I need something sitting in the >>> background that will pick up the print instructions. >>> >>> I'm thinking that I need a seperate EXE that will poll a folder location >>> for print requests, or create a service that will do the polling. >>> >>> Where my knowledge ends is passing data to an EXE or a Service, not >>> something I have had to do before. >>> >>> Can anyone share any experiences of this kind of thing? >>> >>> Cheers, >>> Tull. >>> >> > > If the designer app were the only printing app then this is how I would do
it. The designer is a basic attempt to add an exe to any project that I may write, with the designer the users can create their own label formats. 'Mostly' the print requests will come from other applciations.that this exe has been bundled with. I've toyed with the idea of calling the Design app with data to print, therefore avoiding the design environment, but it is also possible that the designer may not be present and simple label printing from the host app is all that is required. With this complexity in mind I have decided to go with a 'print engine' that can be called as and when required. Of course, if you think I'm completely barking, please let me know, I'm more than happy to try things before settling. Cheers, Tull. Show quoteHide quote "Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message news:%23s4A9sH$GHA.1200@TK2MSFTNGP02.phx.gbl... > Tull, > Designer aside. > > What I am asking is the why does the act of printing need to defer to > another application. > > If Application1 says "print it", why doesn't Application1 simply print it, > why have Application1 queue the request to print it so that Application2 > needs to print it. > > -- > Hope this helps > Jay B. Harlow > .NET Application Architect, Enthusiast, & Evangelist > T.S. Bradley - http://www.tsbradley.net > > > "TClancey" <t***@idcodeware.co.uk> wrote in message > news:p-SdnV0ipfLbTdjYRVnyuA@bt.com... >> Thanks for the info. >> >> I had thought of Writing the whole package and calling the EXE >> differently for design and print mode, but it's likely that the designer >> will be used infrequently. I don't want the designer to be doing too >> much, like polling in the background, so I think two apps is the way to >> go. >> >> Again, thanks. >> Tull. >> >> "Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message >> news:8B7A4DF7-16ED-4D6E-A3B2-0E019D291208@microsoft.com... >>> Oh! I should add, Do you really need a separate EXE (service or >>> otherwise) to print a label, I would consider simply including that >>> logic directly in the same assembly that does the label UI. >>> >>> -- >>> Hope this helps >>> Jay B. Harlow >>> .NET Application Architect, Enthusiast, & Evangelist >>> T.S. Bradley - http://www.tsbradley.net >>> >>> >>> "TClancey" <t***@idcodeware.co.uk> wrote in message >>> news:Xd-dnaxFavfbUd3YRVnyug@bt.com... >>>> Hi all. I hope someone can give me a few pointers on 'best practice' >>>> for an app I'm about to start. >>>> >>>> I'm writing a small and simple label design application, users will >>>> define text fields on the label in a GUI, some data may come from a >>>> database. >>>> >>>> The application will be able to connect to any standard database in >>>> time, but for the time being it's access. >>>> >>>> I will need to 'bolt' this application into many other applications as >>>> time goes by, these applications will all require label printing >>>> functionality, but I don't want to include the designer code everytime, >>>> so I'll just add the EXE and DLL's required to the install set. >>>> >>>> The problem starts when the user actually wants to print a label. I >>>> don't want the designer to load, so I need something sitting in the >>>> background that will pick up the print instructions. >>>> >>>> I'm thinking that I need a seperate EXE that will poll a folder >>>> location for print requests, or create a service that will do the >>>> polling. >>>> >>>> Where my knowledge ends is passing data to an EXE or a Service, not >>>> something I have had to do before. >>>> >>>> Can anyone share any experiences of this kind of thing? >>>> >>>> Cheers, >>>> Tull. >>>> >>> >> >> > |
|||||||||||||||||||||||