A viewport, or viewing port, or simply window, was a type of transparency used to see through a wall so as to view the outside of a starship or building. In nautical terms, porthole was specifically applied to ships.
Materials such as glass, Plexiglass and transparent aluminum were commonly used as a medium in its construction. (Star Trek IV: The Voyage Home; TNG: "In Theory", etc.)
The Vulcan monastery at P'Jem featured large windows without glass in it. (ENT: "The Andorian Incident")
The launch bay aboard Enterprise NX-01 has a control booth with a large round-shaped window in it. (ENT: "The Andorian Incident")
Captain Jonathan Archer made a short break from packing his belongings and had a closer look through his window of his ready room to see the neutronic wavefront approaching Enterprise in 2152. (ENT: "The Catwalk")
In the alternate reality, Leonard McCoy tried to explain that he preferred sitting in the bathroom of the Bardeen to a proper seat, as the bathroom had no windows. (Star Trek)
While on board the Gideons' mock-up of the USS Enterprise, James T. Kirk, who believed he was on the real Enterprise, lead lead Odona to a viewing port, explaining to her that through it, they will be able to see outside. Upon peering through it, Kirk saw a mass of Gideons, rather than space. (TOS: "The Mark of Gideon")
The USS Enterprise-D featured a glass dome as upper center of the main bridge. (TNG: "Encounter at Farpoint")
Data once told Admiral Alidar Jarok, that the middle viewport in Ten Forward aboard the USS Enterprise-D was considered by many crewmembers to be their favorite on the whole ship because of the breathtaking view. (TNG: "The Defector")
The windows on board the USS Enterprise-D were composed of a transparent aluminum alloy. (TNG: "In Theory")
Window would probably be the word Doctor Julian Bashir would say instead of tricorder to name this technical device when he would've suffered from the aphasia virus, as he told Commander Sisko. (DS9: "Babel")
Commander Benjamin Sisko commented on Kai Opaka's choice of viewport for looking out of on Deep Space 9, noting that it was the one with the best view of the Bajoran wormhole. (DS9: "Battle Lines")
Major Kira Nerys told Mullibok a story from her childhood while treating him on Jerrado. The story was about a huge ugly tree in front of her window. It was so huge and ugly even the birds won't sit on it and he derailed the sun from falling into the window. (DS9: "Progress")
Jadzia Dax once told Major Kira that she was a champion window breaker and that she was deadly on a dark night with a few rocks. (DS9: "Duet")
In 2370, after ordering copious alcoholic beverages, Arjin explained to Quark that his reason for imbibing was because he had "just threw my whole life out a porthole." (DS9: "Playing God")
When Derran Tal caught Harry Kim staring out the window of her quarters on board the Varro generational ship, she told him "if you're planning on leaving through the viewport, you might want to get dressed. The interstellar vacuum might get a little chilly." (VOY: "The Disease")
Some windows featured colored glass for artistic purposes. In 1986, Feinberg's Loan and Pawn had a stained glass window out front featuring a bowl of fruit. (Star Trek IV: The Voyage Home) Stained glass windows were often found in religious settings. St. Mary's Church had stained glass windows. (VOY: "Spirit Folk")
Aboard Starfleet ships at least, the viewports could be manually dimmed to protect the occupants of excessive external lighting.(LD: "I Have No Bones Yet I Must Flee")